1

I have a select input for a simpleform with a collection. Is it possible to send three values through?

Something like this?

<option value="3925" value2='abc'>Aberdeen</option>

Where value2 is the additional value i want sending?

<%= demo_distribution.input "sector", as: :select, collection: [['Aberdeen', 3925]], required: false%>
Robbo
  • 1,292
  • 2
  • 18
  • 41
  • Well can you show the corresponding Rails code which generating these option values ? Your code will help us to help you fast. – Arup Rakshit Jun 21 '15 at 20:03

1 Answers1

0

The <option> tag should be part of a <select> or similar element. It's possible to select multiple options in a <select> element but not to have multiple values in one <option> element.

Check this out for Rails select/option helpers: http://guides.rubyonrails.org/form_helpers.html#the-select-and-option-tags

sourcx
  • 944
  • 7
  • 22