I can’t get all the values of a radio buttom from contact form 7

[ad_1]

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

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer