Is is there anyway to populate multiple fields using the example below? I know I can copy and paste the script every time I want to populate another field but I was hoping to be able to shorten the amount of code.
Do you know of an easy way to add this functionality using the code below from Alex?
Thanks!
------------------
<?php
add_filter("gform_pre_render_167", "monitor_dropdown");
function monitor_dropdown($form){
?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#input_167_3').bind('change', function()
{
//get selected value from drop down;
var selectedValue = jQuery("#input_167_3").val();
//populate a text field with the selected drop down value
jQuery("#input_167_1").val(selectedValue);
});
});
</script>
<?php
return $form;
}
?>