Module: Panda::Core::FormHelper

Defined in:
app/helpers/panda/core/form_helper.rb

Instance Method Summary collapse

Instance Method Details

#panda_form_with(**options) ⇒ Object

Wraps form_with to apply consistent admin form styling across all Panda engines. Sets the custom FormBuilder and applies default CSS classes for padding/layout.



8
9
10
11
12
# File 'app/helpers/panda/core/form_helper.rb', line 8

def panda_form_with(**options, &)
  options[:builder] = Panda::Core::FormBuilder
  options[:class] = ["block visible", options[:class]].compact.join(" ")
  form_with(**options, &)
end