Class: Formbuilder::ResponseFieldText
- Inherits:
-
ResponseField
- Object
- ActiveRecord::Base
- ResponseField
- Formbuilder::ResponseFieldText
- Includes:
- ActionView::Helpers::TagHelper
- Defined in:
- app/models/formbuilder/response_field_text.rb
Constant Summary
Constants inherited from ResponseField
Formbuilder::ResponseField::ALLOWED_PARAMS
Instance Attribute Summary
Attributes inherited from ResponseField
#cid, #field_type, #input_field, #options_field, #search_type, #serialized, #sort_as_numeric
Instance Method Summary collapse
Methods inherited from ResponseField
#audit_response, #before_response_destroyed, #has_length_validations?, #length_validations, #max, #maxlength, #min, #min_max_length_units, #min_max_validations, #minlength, #normalize_response, #options_array, #render_entry, #render_entry_text, #sortable_value, #transform_raw_value, #validate_response
Instance Method Details
#render_input(value, opts = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'app/models/formbuilder/response_field_text.rb', line 11 def render_input(value, opts = {}) tag( :input, type: 'text', name: "response_fields[#{self.id}]", id: "response_fields_#{self.id}", class: "rf-size-#{self[:field_options]['size']}", data: self.length_validations, value: value ) end |