I am using select2 and I have a collection_select in an update form that looks like this:
<%= collection_select(:event, :project_date_id, @project_dates.available, :id, :schedule_date, :prompt => false, :selected => @set_date.id) %>
When an option is selected (:id), I want to also put the displayed value (:schedule_date) in a hidden field.
<%= f.hidden_field :starts_on, value: {HERE'S WHERE the :schedule_date display value from the select goes}
I feel like this is a job for Jquery...but I'm very new to Jquery and having trouble figuring it out.