Chronoforms v6 show / hide settings

Bouchal 09 Feb, 2018
Hello,
I need to make a form showing a lot of fields based on other fields, like this:

Type1 shows the "Choose_color1" field and hides the others

Type2 displays the "Choose_color2" field and hides the others

Type3 displays the "Choose_color3" field and hides the others

Type4 shows the "Choose_color4" field and hides the others

Type5 shows the "Choose_color5" field and hides the others
Type6 displays the "Choose_color6" field and hides the others

Type7 shows the "Choose_color7" field and hides the others

Now, i do this:

Type1 show Select_color1
Type1 hide Select_color2
Type1 hide Select_color3
Type1 hide Select_color4
Type1 hide Select_color5
Type1 hide Select_color6
Type1 hide Select_color7

and same setting for all next type...


- this procedure is ok for simple forms.
but now I would have created bigger form with many setting and this procedure is awful.
Is there some simplify procedure?
Something like: Type1 "show" Select_color1 and the other "hide" ..?
Thank you for your help!
Max_admin 10 Feb, 2018
1 Likes
Hi Bouchal,

The "Identifier" field can accept multiple selectors in multiple lines, so your hide rules can be briefed in 1 hide rule with multiple ids:
select_color1
select_color2
...
OR you can group your fields using classes, and use the class the target them instead of the id, the above situation would be:
.select_color_fields_2_7
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Henged 15 Feb, 2018
Hello,
I am trying to show text when radio button is selected and hide it when it is unselected. I found out only how to hide it, but i need it to be hidden from the start and show after button selected. I tried enter visibility:hidden or display:none in div style, but it does not work. Maybe someone know solution?Chronoforms v6 show / hide settings image 1
Chronoforms v6 show / hide settings image 2
GreyHead 16 Feb, 2018
Hi Henged,

Does it work if you add the CSS directly to the <div> tag in the HTML element?

Bob
Henged 16 Feb, 2018
Thank you for replay. Yes, I can hide element with CSS, but event action "Show" does not show it. I don't know how "Show" works so i can't hide right element.Chronoforms v6 show / hide settings image 3
GreyHead 16 Feb, 2018
Hi Henged,

I experimented with this but could not find a way to get it to work. Please ask Max to take a look using the Contact Us menu above and linking to this thread.

Bob
Henged 16 Feb, 2018
Answer
Thank you, I wrote to Contact Us, but found solution myself, I have to use display:none in div, like this
<div id="X" style="display:none">
<p>This is a paragraph.</p>
</div>

All works!
This topic is locked and no more replies can be posted.