Class: Plutonium::UI::Form::Components::HiddenWrapper

Inherits:
Phlexi::Form::Components::Base
  • Object
show all
Defined in:
lib/plutonium/ui/form/components/hidden_wrapper.rb

Overview

Wrapper for fields configured as ‘as: :hidden`. Emits a hidden div containing only the input — no label, no hint, no error chrome. `hidden: true` (HTML5) sets `display: none` so the wrapper is excluded from CSS Grid / Flex layout, not just visually hidden.

Instance Method Summary collapse

Instance Method Details

#build_attributesObject

No id needed for a layout-suppressed wrapper.



19
20
# File 'lib/plutonium/ui/form/components/hidden_wrapper.rb', line 19

def build_attributes
end

#view_template(&block) ⇒ Object



12
13
14
15
16
# File 'lib/plutonium/ui/form/components/hidden_wrapper.rb', line 12

def view_template(&block)
  div(hidden: true) do
    yield(field) if block
  end
end