Class: Katalyst::GoogleApis::GOVUKFormBuilder::Recaptcha

Inherits:
GOVUKDesignSystemFormBuilder::Base
  • Object
show all
Includes:
GOVUKDesignSystemFormBuilder::Traits::ContentBeforeAndAfter, GOVUKDesignSystemFormBuilder::Traits::Error, GOVUKDesignSystemFormBuilder::Traits::HTMLAttributes
Defined in:
app/helpers/katalyst/google_apis/govuk_form_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(builder, object_name, attribute_name, form_group:, before_input:, after_input:, **kwargs) ⇒ Recaptcha

Returns a new instance of Recaptcha.



29
30
31
32
33
34
35
36
# File 'app/helpers/katalyst/google_apis/govuk_form_builder.rb', line 29

def initialize(builder, object_name, attribute_name, form_group:, before_input:, after_input:, **kwargs)
  super(builder, object_name, attribute_name)

  @html_attributes      = kwargs
  @form_group           = form_group
  @before_input         = before_input
  @after_input          = after_input
end

Instance Method Details

#htmlObject



38
39
40
41
42
# File 'app/helpers/katalyst/google_apis/govuk_form_builder.rb', line 38

def html
  GOVUKDesignSystemFormBuilder::Containers::FormGroup.new(*bound, **@form_group).html do
    safe_join([error_element, content])
  end
end