How can I get other field value?

I use this code to get other field value:

<%= hidden_field_tag 'project_version_select', $('other_id').getValue()%>

but I got compile error. How can I get the value?


You need to add the hidden_field first without a value and then set the value of it using script tag