Module: CCS::FrontendHelpers::GovUKFrontend::Fieldset

Included in:
CCS::FrontendHelpers::GovUKFrontend
Defined in:
lib/ccs/frontend_helpers/govuk_frontend/fieldset.rb

Overview

GOV.UK Fieldset

This helper is used for generating the fieldset component from the GDS - Components - Fieldset

Instance Method Summary collapse

Instance Method Details

#govuk_fieldset { ... } ⇒ ActiveSupport::SafeBuffer

Generates the HTML for the GOV.UK Fieldset component

Parameters:

  • legend (Hash)

    options for the fieldset legend. See Legend#initialize for details of the options.

  • options (Hash)

    options that will be used in customising the HTML

Yields:

  • HTML that will be contained within the ‘govuk-fieldset’ div and under the legend

Returns:

  • (ActiveSupport::SafeBuffer)


24
25
26
# File 'lib/ccs/frontend_helpers/govuk_frontend/fieldset.rb', line 24

def govuk_fieldset(**, &)
  Components::GovUK::Fieldset.new(context: self, **).render(&)
end