I have a big job application and a part of that is an Equal Opportunities section;
What I need to happen is the user can only select 1 from the 5 options, I can do this fine with jQuery.
I have this working using the 'gform_page_loaded' filter, the only problem is the radio data isn't being sent.
The radio groups are exclusive but no data.
This is my function.
add_filter('gform_pre_render_7', 'add_readonly_script');
function add_readonly_script($form){
?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#input_1_1, #input_1_2").prop('readonly',true);
jQuery(document).bind('gform_page_loaded', function(){
jQuery('.equal_opp').find(':radio').attr('name', 'opt');
});
})
</script>
<?php
return $form;
}
Any way to do this.
Many thanks
neil