I have a couple of different things happening on one page, and I need to have the selections pulled from an elementor filter form to populate a gravity forms field (ideally a hidden one).
I have this code here:
jQuery(document).ready(function($) { function updateGravityFormHiddenFields() { var selectedValue = $('#wpc-taxonomy-work_location-3945').val(); $('#input_3_14').val(selectedValue); } updateGravityFormHiddenFields(); $('#wpc-taxonomy-work_location-3945').change(function() { updateGravityFormHiddenFields(); }); });
Which doesn't work annoyingly. I can get it to change/populate once.. But then not again, if someone changes their selection. I'm essentially looking for something like this code, as this doesn't seem to allow for multiple different selections and different fields.
Any ideas/help working this out would be great :)