Hi all,
How to hide/show an area in CV6?
The event selection doesnn't seem to work for areas and textareas.
Thanks
Hi havex,
It's the same for all elements, but the "Element identifier" must be set correctly, if you are targeting a field by name then use the element name, if you are using the id then use "#element_id", if you are using a class then use ".element_class"
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thank you Max, that works like charm.
I am having a lot of trouble with this. I am trying to convert a Chronoforms V5 form to V6.
In V5, I used div containers - Container 1, Container 2, Container 3. I chose Hidden for their initial state. The fields within each container had visible initial state. However, when the page loaded, they were hidden, because they were in a container that was hidden. That was exactly what I wanted. There was a dropdown where I set events to show container 1 if 1 was selected, and hide containers 2 and 3, etc.
In V6, I thought I could do the same thing with Multi fields area. But there is no ability to set "hidden" for initial state for an area. So I searched and found this post, but no matter what I try, the 3 fields in Area 1 are showing.
What exactly am I supposed to put in the dropdown events to hide container 1 and the fields it contains for page load? I have tried the following:
On Selecting Value 0 Action Hide Element(s) Identifier #area_1_id
On Selecting Value "" Action Hide Element(s) Identifier #area_1_id
On Selecting Value NULL Action Hide Element(s) Identifier #area_1_id
On Selecting Value = Action Hide Element(s) Identifier #area_1_id
I left "Hidden" to be empty on each of the fields within area_1 (so I don't have to target each individual field - can target the area like I targeted the container in V5.
There must be some easy syntax thing I'm missing - please help!
Also, it says "Value(s)" - do I separate with a comma? Same question for Element Identifier(s)?
Thanks!!
I loaded the current version of Chronoforms6 (6.0.13, from October 23) and still have an issue with this.
I can now get the fields to be initially hidden. I can make them display if I set the event at the field level, but can't make it work for area.
For example, I have 2 areas, and each contains 3 fields. I ask a question, and the answer is 1 or 2 (dropdown).
In Chronoforms 5, I could show/hide all 3 fields in a single event - I would say to show/hide container 1, and fields 1, 2, and 3 in that container show or be hidden. I did not have to target each field individually.
But I can't get this to work in Chronoforms 6. I am using this syntax for the event:
On Selecting Value 1 Actions Show Enable Validation Element(s) Identifier #area_1_id
Similar for hide.
But when I select "1" from the dropdown, instead of showing the 3 area_1 fields, nothing happens.
If I instead target each field in the event for the dropdown (a lot more work), fields do show/hide appropriately.
Am I doing something wrong with the syntax for Chronoforms6, or does this behave differently from Chronoforms5 show/hide containers?
Thanks for your help!
Hi JerseyGirl,
Apologies for the late reply!
Then you have the fields initially hidden in the fields settings, correct ? in this case you can't show them by showing the area, instead do not hide the fields but hide the area when the form loads, there is no setting to hide the area by default but you can set a dropdown "on selecting" default value then hide the area.
Another solution is to keep on what you are doing, and save efforts by adding multiple fields in the "Element identifier":
field_name1
field_name2
field_name3
OR use
#area_1_id :input
Both should work ok
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.