Hi everyone,I’m creating a form and I want the "INVIA" button to appear only when the user selects the mandatory consent option.
I’ve added a radio group in a multi field area labeled “Consenso” with two options (SI = Acconsento, NO = Non acconsento), as shown in the attached image.
The "INVIA" button is in another multi field area, where I’ve applied a Run Conditions setting with:
-
Value 1:
{data:consenso}
-
Value 2:
SI
The button is correctly hidden when the form loads, but it does not reappear when the user selects “Acconsento.”
Where am I going wrong?
Thanks.
Hi amax
You are trying to have an interactive live condition, this can be done using Triggers and Listeners:
but the Run Conditions is for server conditions, for example if the INVIA button is in a different form page or if the {data:consenso} is a URL parameter
Thanks Max for your reply, I’ve now understood and it works perfectly.Referring to the guide you linked, if I select ck2 the hidden field appears correctly, but if I then select ck1 or ck3, the field does not automatically disappear. Did I miss a step?
Thanks.
You need to have 2 triggers, one for Value In ck1, another for Value Not In ck1, and 2 listeners for the 2 triggers
Once I understood the concept, I decided to apply it to another field and it works perfectly.I have a dropdown with options 1, 2, 3. For option 2, I linked two radio groups (a, b, c and 2a, 2b, 2c).
My first question: is it possible to make the radio groups required?I tried, but if I don’t select option 2 in the dropdown (so the radio groups are not visible), the system still says the choice is required.
My second question: is it possible to hide the two radio groups in the email when option 2 has not been selected? In the email I use {email:data_table} to display the selected form data.
Thanks.
Hi amax
1- Yes, just set them as required by default, if you need to disable this and enable it using Events then disable it using a trigger On Document Ready
Later you can enable the validation when another trigger occurs
2- The next update should make this possible, you will be able to control it using a shortcode:
Thanks, it’s now working perfectly.
Regarding my second question: is there any forecast for the date of the next update?
Anyway, I’d like to say that I’m very satisfied with the work that has been done to develop Chronoforms, and I really appreciate everyone’s effort.
Sorry for my previous reply, I’ve just seen the updated version and I’m now testing it.
No worries, please get the latest file as there have been a hotfix for the checkboxes.
I tried using the new behavior, but it’s still not clear to me how it works.To be more specific, here’s my case:
I have a dropdown “Choose” with three options: “A, B, C”. If I select “C”, two radios group: the first one “Radio-1” with “Yes and No”, the second one “Radio-2” with “1, 2 and 3”.Now, what I’d like is that in the email the labels and the answers for “Radio-1” and “Radio-2” are not visible unless “C” is selected in the dropdown “Choose”.
I’ve tried a few tests but I couldn’t get it to work.
Thanks.
Hi amax
You will need a PHP action:
Here I assume your "Choose" field name is "choose"
And in your fields Email Content behavior:
Now if {var:php18} returns a non empty string then the field will not appear in the Email content
Hi Max,first of all, thank you for your quick replies and for the time you’ve dedicated to me.I tried to follow the instructions, but something doesn’t seem to work (I’m probably making a mistake). I’m attaching:
-
the screenshot of the PHP block,
-
the “Tipologia” dropdown with the “Privato” option,
-
the radio group that should be hidden,
-
the received email with the data.
Thanks a lot, Max