Class: REDCap::Form::CheckboxesWithOther
- Inherits:
-
Checkboxes
- Object
- Struct
- Field
- RadioButtons
- Checkboxes
- REDCap::Form::CheckboxesWithOther
- Defined in:
- lib/red_cap/form/fields.rb
Direct Known Subclasses
CheckboxesWithCheckboxesOrOther, CheckboxesWithRadioButtonsOrOther
Constant Summary
Constants inherited from Field
Instance Attribute Summary
Attributes inherited from Field
#attributes, #form, #responses
Instance Method Summary collapse
Methods inherited from RadioButtons
Methods inherited from Field
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class REDCap::Form::Field
Instance Method Details
#other_text_field ⇒ Object
116 117 118 |
# File 'lib/red_cap/form/fields.rb', line 116 def other_text_field associated_fields_for_key("501").find(&:text?) end |
#value ⇒ Object
106 107 108 109 110 111 112 113 114 |
# File 'lib/red_cap/form/fields.rb', line 106 def value .map do |key, value| if key == "501" # Other "#{value}: #{other_text_field&.value}" else value end end end |