How to Test Value of Radio Group

@Teodor

I have a radio group as shown below, and I want to test the value it is set to… so to say:

dmx-show="(RADIO_GROUP.value=='copy') || (RADIO_GROUP.value=='modify')"

How do I name the radio group to be able to make this test?

Thanks!
Antony.

<div class="form-check">
	<input class="form-check-input" type="radio" value="" id="new" name="wizard_action">
	<label class="form-check-label" for="new">Define new activity</label><br>
	<input class="form-check-input" type="radio" value="" id="copy" name="wizard_action">
	<label class="form-check-label" for="copy">Copy existing activity</label><br>
	<input class="form-check-input" type="radio" value="" id="modify" name="wizard_action">
	<label class="form-check-label" for="modify">Modify existing activity</label><br>
</div>

Well you just want to check the value of wizard_action input.

But that doesn’t seem to work @teodor… when I have a paragraph:

<p class=" fs_70 c_left5 pt-3">wizard_action.value: {{wizard_action.value}}</p>

It does not show a value as I select the different radio buttons.

If I have a normal text input:

<input id="i_wizard_action" name="wizard_action" type="text" class="form-control">

Then I can test the value of i_wizard_action.value, and name="wizard_action" specifies what variable name is passed on a form submit…

So I’m wondering how to give this equivalent of id=“i_wizard_action” to my radio button group…

I hope this makes sense!

Sorry, I’m on the phone haven’t checked your code well. You mention a radio group but I don’t actually see any form group in your code. Please check:

1 Like

The value attribute needs a value.

2 Likes

Thank you @Teodor and @Quy, that worked perfectly! :tada: