Module: GOVUKDesignSystemFormBuilder::Builder
- Included in:
- Koi::FormBuilder
- Defined in:
- lib/govuk_design_system_formbuilder/elements/image.rb,
lib/govuk_design_system_formbuilder/elements/document.rb
Instance Method Summary collapse
-
#govuk_document_field(attribute_name, label: {}, caption: {}, hint: {}, form_group: {}, **kwargs, &block) ⇒ Object
Generates a
div
element with aninput
with type=file with a label, optional hint. -
#govuk_image_field(attribute_name, label: {}, caption: {}, hint: {}, form_group: {}, **kwargs, &block) ⇒ ActiveSupport::SafeBuffer
Generates a
div
element to preview uploaded images and aninput
with type=file with a label, optional hint.
Instance Method Details
#govuk_document_field(attribute_name, label: {}, caption: {}, hint: {}, form_group: {}, **kwargs, &block) ⇒ Object
Generates a div
element with an input
with type=file with a label, optional hint.
60 61 62 63 |
# File 'lib/govuk_design_system_formbuilder/elements/document.rb', line 60 def govuk_document_field(attribute_name, label: {}, caption: {}, hint: {}, form_group: {}, **kwargs, &block) Elements::Document.new(self, object_name, attribute_name, label:, caption:, hint:, form_group:, **kwargs, &block).html end |
#govuk_image_field(attribute_name, label: {}, caption: {}, hint: {}, form_group: {}, **kwargs, &block) ⇒ ActiveSupport::SafeBuffer
Generates a div
element to preview uploaded images and an input
with type=file with a label, optional hint.
87 88 89 90 |
# File 'lib/govuk_design_system_formbuilder/elements/image.rb', line 87 def govuk_image_field(attribute_name, label: {}, caption: {}, hint: {}, form_group: {}, **kwargs, &block) Elements::Image.new(self, object_name, attribute_name, label:, caption:, hint:, form_group:, **kwargs, &block).html end |