Skip to content

Simple form with phlex #580

Answered by sliminas
Vagab asked this question in Help
Discussion options

You must be logged in to vote

@Vagab For me it worked by including the respective modules for the form helpers, and those from ActionView that the helper uses:

include Phlex::Rails::Helpers::FormFor
include Phlex::Rails::Helpers::DOMClass
include SimpleForm::ActionViewExtensions::FormHelper

def template
  simple_form_for @record, url: @url do |f|
    f.input :whatever
  end
end

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by joeldrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants