Class: GenericFormFor::Inputs::PhoneInput

Inherits:
Object
  • Object
show all
Includes:
Base, String
Defined in:
lib/generic_form_for/inputs/phone_input.rb

Instance Attribute Summary

Attributes included from Base

#builder, #column, #method, #object, #object_name, #options, #template

Instance Method Summary collapse

Methods included from Base

#autofocus?, #default_input_options, #form_builder_options, #initialize, #input_html_class, #input_options, #merge_html_options, #to_html, #wrap_in

Methods included from Base::ErrorMessage

#error_html, #error_html_options, #errors, #errors?, #render_error?

Methods included from Base::Label

#label_html, #label_html_options, #label_text, #render_label?, #requirement_text, #translated_label

Methods included from Base::Validations

#decimals, #limit, #limits_from_validations, #maximal_number, #minimal_number, #required?, #required_from_validations?

Methods included from Base::Hint

#hint_html, #hint_html_options, #hint_text, #render_hint?

Methods included from GenericFormFor::I18n

#translate, #translate_action, #translate_hint, #translate_label, #translate_legend, #translate_placeholder

Instance Method Details

#input_html(config_options = {}) ⇒ Object



13
14
15
# File 'lib/generic_form_for/inputs/phone_input.rb', line 13

def input_html(config_options={})
  template.concat builder.text_field(method, merge_html_options(input_html_options,config_options))
end

#input_html_optionsObject



7
8
9
10
11
# File 'lib/generic_form_for/inputs/phone_input.rb', line 7

def input_html_options
  {
    :type => "tel"
  }.merge(super)
end