I can’t get all the values of a radio buttom from contact form 7
-
I have a radio buttom in contact form 7, with more than one value:
[radio radio-100 id:radio1 default:1 “FirstValue” “SecondValue” “ThirdValue”]
I want to get the value of the selected option with jQuery
to modify certain fields of the form, according to the chosen option:<script type=”text/javascript”>
var $ = jQuery;
$(document).ready(function (){
console.log(“document ready”);$(“[name=’radio-100′]”).click(function(){
if($(“[name=’radio-100′]”).attr(“value”) === ‘FirstValue’){
//code
}else{
//code
}
});
});
</script>The problem is that when I select the second or third option,
I do not get their respective values,
I always get the value of the first option.Example:
When I select the first option, I get the respective value for the first option.
When I select the second option, I get the respective value of the first option.
By selecting the third option, I get the value respective to the first option.If I alternate the options in the radio button of the contacf form,
the same thing happens, I always get the value of the first option that I set,
even if I select other options.Please HelpMe
- The topic ‘I can’t get all the values of a radio buttom from contact form 7’ is closed to new replies.