Forums

How to add a field based on a selection

NJM 27 Apr, 2017
Hi there,

I have a question. I'm using Chronoform v6. I can't seem to figure out how to create my form so that:
- You have dropdown box with a list of 5 values.
- If you select value 3, an extra box (or more) appear. some additional info let's say

is this possible, and if so, how? :-))

Kind regards
JMN
GreyHead 27 Apr, 2017
Hi JMN,

You can use the Events tab in the CheckBox Group element to show/hide other form elements.

Bob
NJM 02 May, 2017
Hi Bob,

Thanks for the tip. It is really helpful. Another additional question. Is this event charged on the spot,
I mean, when i check one, does it immediately response?

I've added a CheckBox group and I have y=Yes and n=No as checkbox values.
Then, I've added an Event "on selecting value 'y' actions 'hide' element identifier 'select16'
select16 is the id of a dropdown field.

Is this correct?

Thanks for feedback,
kind regards
GreyHead 02 May, 2017
Hi noeljm,

Yes the change will be immediate.

To use an element ID as an identifier please prefix it with # - #select16

Bob
NJM 02 May, 2017
Guess I'm missing something.
The Event is in the checkbox group itself, right? On tab "Designer - Sections".
No need to add something in the general Events?

Is the identifier with spaces ? #(space)-(space)#select16

Thanks!
Max_admin 02 May, 2017
Hi noeljm,

In most cases the field name will work, so select16 will work as an identifier, but in some cases (not with fields but with areas and other elements), you need to use the id selector: #select16

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
NJM 02 May, 2017
Ow Okay, now I understand. Thanks!
Works like a charm.
This topic is locked and no more replies can be posted.