Class: Playbook::PbForm::Form::SimpleFormForm

Inherits:
Object
  • Object
show all
Defined in:
app/pb_kits/playbook/pb_form/form/simple_form_form.rb

Instance Method Summary collapse

Constructor Details

#initialize(form) ⇒ SimpleFormForm

Returns a new instance of SimpleFormForm.



7
8
9
# File 'app/pb_kits/playbook/pb_form/form/simple_form_form.rb', line 7

def initialize(form)
  self.form = form
end

Instance Method Details

#merged_form_system_optionsObject



15
16
17
18
19
20
21
22
23
24
# File 'app/pb_kits/playbook/pb_form/form/simple_form_form.rb', line 15

def merged_form_system_options
  [
    Array(form_system_options)[0],
    Hash(Array(form_system_options)[1]).merge(
      data: { "pb-form-validation": validate }.merge((form_system_options&.last || {}).fetch(:data, {})),
      html: merged_html,
      builder: form_builder
    ),
  ]
end

#to_partial_pathObject



11
12
13
# File 'app/pb_kits/playbook/pb_form/form/simple_form_form.rb', line 11

def to_partial_path
  "pb_form/form_simple_form"
end