I have a form with some static HTML and embedded Rails form helpers and I'd like to pass the value of an element in the static HTML as a parameter to a method defined in an embedded form helper tag:
<div class="field">
<input type="radio" name="filter_param" value="a">A</input>
<input type="radio" name="filter_param" value="b">B</input>
<input type="radio" name="filter_param" value="c">C</input>
</div>
<div class="field">
<%= f.select(:things, ThingsHelper.all_the_things(filter_param: ...), {required: true, include_blank: 'Select a thing.'}) %>
</div>
Is it possible to replace the ... in the example above with something that references with filter_param value from the static HTML?
If not what's the best or most Rails friendly way to solve this? JavaScript?