class REDCap::Form::Checkbox

Public Instance Methods

other?(key) click to toggle source
# File lib/red_cap/form/fields.rb, line 128
def other? key
  other_text_field(key)
end
other_text_field(key) click to toggle source
# File lib/red_cap/form/fields.rb, line 124
def other_text_field key
  associated_fields_for_key(key).find(&:text?)
end
value(responses) click to toggle source
# File lib/red_cap/form/fields.rb, line 114
def value responses
  selected_options(responses).map do |key, value|
    if other?(key)
      "#{value}: #{other_text_field(key).value(responses)}"
    else
      value
    end
  end
end