Hello,
I want to change the value of a radio button based on a drop down field. For example, if you choose the title "Mister" in the drop down, then I would want the radio button for the gender to be "Male".
I'm a little bit lost with how to make javascript work with Plumsail...
Thanks in advance
Hello @almecin,
If you want to change the field value based on the other field, you can use this code:
fd.rendered(function() {
fd.field('DropDown').$on('change',function(value){
if(value=='Mister'){
fd.field('RadioButton').value = 'Male'
}
});
});
Replace DropDown and RadioButton with the fields' names.
You can find more examples of how to work with fields using JS on Plumsail Forms in our documentation here.
1 Like
Thanks a ton! This helped me big time.
1 Like