Hello @ohtusabes
Thank you very much for using our plugin.
You don’t have a radio button field with multiple choices, you have separate radio button fields.
So, in your case, you must emulate the process by coding.
Please insert an “HTML Content” field in the form and enter the following piece of code as its content:
fbuilderjQuery(document).on('click', '#fbuilder [type="radio"]', function(){
let me = this;
fbuilderjQuery('#fbuilder [type="radio"]').each(function(){
if(this.id != me.id) getField(this).setVal(0);
});
});
Best regards.
Thread Starter
PB
(@ohtusabes)
Hi @codepeople,
I did as you indicated but it didn´t work. https://app.ucimhef.org/?cff-form=72
Hello @ohtusabes
I’m sorry, you must include the code into a pair of <script></script> tags:
<script>
fbuilderjQuery(document).on('click', '#fbuilder [type="radio"]', function(){
let me = this;
fbuilderjQuery('#fbuilder [type="radio"]').each(function(){
if(this.id != me.id) getField(this).setVal(0);
});
});
</script>
Best regards.
Thread Starter
PB
(@ohtusabes)
Hi @codepeople,
It works now. Thank you. And how I set the calculated field? I have troubles here when selecting each radio button.
Hello @ohtusabes
Please describe the equation and include its code.
Best regards.
Thread Starter
PB
(@ohtusabes)
Hi @codepeople,
You can see the equation in https://app.ucimhef.org/?cff-form=72. The results should be “Grado 1”, “Grado 2”, “Grado 3″,”Grado 4” or “NE”. I only obtain “0” or “NE”. Thank you.
Hello @ohtusabes
Since the radio buttons are separate fields and not choices of the same radio buttons field, you must check its value before returning it:
(function(){
if(fieldname97) return fieldname97|r;
if(fieldname100) return fieldname100|r;
if(fieldname102) return fieldname102|r;
if(fieldname103) return fieldname103|r;
if(fieldname106) return fieldname106|r;
})()
Best regards.