Showing fields conditionally

rikulahteenmaki 18 Nov, 2020
I would need exact instructions on how to make a field (text field) to show based on a value selected in a checkbox group.
This is what I have tried to do with the text field that should be conditional:
1. Selected 'Hidden' from Interface options
2. Selected 'Events' from the Interface options
3. Selected 'Toggle shown' from Actions options and 'If ANY match'
4. Selected the checkbox group field on which the text field should be conditional (IF statement)
5. Selected 'Triggers' as a condition
6. Typed the value of the checkbox field, which should make the text field visible
The above settings result in a hided text field, but it will not toggle shown by triggering the checkbox.
Max_admin 20 Nov, 2020
Answer
Please check this video:
Fields events in ChronoForms7
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rikulahteenmaki 20 Nov, 2020
The video solves the issue in most parts, but it relates to only radio buttons. I am using checkboxes, so how could I get the conditional text field to be hidden again, when it is triggered emtpy after once having been checked?
Max_admin 20 Nov, 2020
use the "is empty" option instead of "equals"
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mr.iljagusevs356 01 Aug, 2023
Instruction in video works only in Admin View, not in Front View...
mr.iljagusevs356 01 Aug, 2023
UPD: After the video, it only works for me in Admin View, but not in Front View

I found that the data-vevents attribute is added to the Admin View, and therefore it works, but it is not in the Front View. For example,

Front View:
<div class="mainfield field hidden" data-vtype="textarea" data-uid="37" data-isinput="1"><label for="text_area2">How are you?</label><textarea name="text_area2" rows="3" id="text_area2"></textarea></div>


Admin View:
<div class="mainfield field hidden" data-vevents="[{"actions":["show"],"logic":"or","rules":{"1":{"source":"19","action":"==","value":["\u0414\u0440\u0443\u0433\u043e\u0435"]}}},{"actions":["hide"],"logic":"or","rules":{"1":{"source":"19","action":"==","value":["\u0420\u0435\u0448\u0435\u043d\u0438\u0435 1"]}}},{"actions":["hide"],"logic":"or","rules":{"1":{"source":"19","action":"==","value":["\u0420\u0435\u0448\u0435\u043d\u0438\u0435 2"]}}},{"actions":["hide"],"logic":"or","rules":{"1":{"source":"19","action":"==","value":["\u0420\u0435\u0448\u0435\u043d\u0438\u0435 3"]}}}]" data-evsources="["19"]" data-vtype="textarea" data-uid="21" data-isinput="1"><textarea name="text_area" rows="3" id="text_area"></textarea></div>
Max_admin 01 Aug, 2023
is your Chronoforms validated ? v7 has some validated only features, you can enable the trial mode to test this
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mr.iljagusevs356 02 Aug, 2023
I have a warning "We could not connect to the chronoengine.com web server."
mr.iljagusevs356 02 Aug, 2023
Yes, after validation everything worked. Thank you.
You need to login to be able to post a reply.

VPS & Email Hosting 20% discount
hostinger