I can't get Double Dropdown to work

baxterdown 24 Nov, 2014
Hi Bob,

I am creating a form with a dropdown here where depending on the option(s) selected, four other fields (the same fields always) will appear.

From reading FAQs, I assume that what I'm trying to create is a double dropdown. But, I can't get it to work correctly. Here's what I'm doing:

I created a dropdown with these options:
Apartments/Multi-Housing=Apartments/Multi-Housing
Academic Institutions=Academic Institutions
Assisted Living Facilities=Assisted Living Facilities
Athletic Facilities=Athletic Facilities
Field Name: marketplace
Field ID: marketplace_dropdown

I created two text boxes, and placed them it under the dropdown as follows:
Label: Number of Laundry Machines
Field Name: marketplace
Field ID: marketplace_01
Load State: Parent Hidden

Label: Do you own or lease your current equipment?
Field Name: marketplace
Field ID: marketplace_02
Load State: Parent Hidden

I went back to the dropdown and selected Events and added two events as follows:
On = Apartments/Multi-Housing | Show Parent | marketplace_01 -- I left Option List empty
On = Apartments/Multi-Housing | Show Parent | marketplace_02 -- I left Option List empty

When I test the form, the Number of... and Do you own... fields are hidden and appear when I select Apartments/Multi-Housing from the dropdown. But, If I select another option, the extra fields don't hide themselves again.

Also how can I add more than one selected value to the events? These hidden fields should appear when several of the dropdown options are selected.

Thanks in advance for your help!

Jose
Max_admin 24 Nov, 2014
Hi Jose,

You have to also add events to hide the fields, e.g:

On != Apartments/Multi-Housing | Hide parent | Field id

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
baxterdown 24 Nov, 2014
Thanks Max! How can I add more than one selected value to the events? These hidden fields should appear when several of the dropdown options are selected.

Jose
baxterdown 24 Nov, 2014
Max / Bob,

I'm definitely doing something wrong... Because the field name is the same for the dropdown and all of the hidden fields, when the email is generated, it's not displaying any of the data.

Please help!

Jose
Max_admin 24 Nov, 2014
Hi Jose,

You can add more events, or use the the "!=" to match other values!

You can regenerate the email template or create it manually, the auto generation is not guaranteed to work in ALL cases, you may need some customization sometimes, just include any field name you want to display between 2 curly brackets!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
baxterdown 24 Nov, 2014
Hi Max,

I'm even more confused now... :?

REGARDING MORE EVENTS
I need the hidden fields to appear when the user selects Apartments/Multi-Housing, Academic Institutions, or Assisted Living Facilities from the dropdown options.

Since I have four hidden fields and I'm using "On =" to display them and "On !=" to hide them. I'm confused as to how do I add more events or how do I use "!=" to match other values.

REGARDING THE EMAIL
I know how to generate email templates. The problem I have is that the dropdown and all four hidden field names are the same "marketplace" so when I create the email, the code ends up looking like this...


<table>
<tr><td>Your Marketplace</td><td>{marketplace}</td></tr>
</BR>
-- IF APPLICABLE
<tr><td>Number of Laundry Machines</td><td>{marketplace}</td></tr>
<tr><td>Do you own or lease your current equipment?</td><td>{marketplace}</td></tr>
<tr><td>If you lease, who is your current vendor?</td><td>{marketplace}</td></tr>
<tr><td>Lease Expiration</td><td>{marketplace}</td></tr>
</BR>
<tr><td>First Name</td><td>{namefirst}</td></tr>


The email generated looks like this:

The person listed below completed the Aaxon online quote request. Following is the information submitted:
Your Marketplace 2017

-- IF APPLICABLE
Number of Laundry Machines 2017
Do you own or lease your current equipment? 2017
If you lease, who is your current vendor? 2017
Lease Expiration 2017

First Name Jose

As you can see, the email is grabbing the last entry for {marketplace} and using it in all fields.

I tried changing the field name of the hidden fields, but when I do they no longer work.

ONE NEW PROBLEM
As I was completing the form to provide you with the sample above, I noticed that when I try to move between hidden fields (after they have appeared of course) by hitting tab, the fields get hidden.

FINALLY...
I have to go live, so I'm gonna use a copy of the form without the hidden fields. You can access the form in question here. If that page is not available, it means I went live. In that case, the form will be here
Max_admin 25 Nov, 2014
Well, you can't have more than 1 field with the same name or you will always get the last value.

In order for this to work, you have to disable the other fields!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
baxterdown 02 Dec, 2014
Max, of course I know that I cannot have more than 1 field with the same name!!! -- But your instructions say to do EXACTLY THAT. Also, unless I have the same name on all the fields, the dropdown doesn't work.

With every answer you provide I'm more and more confused.

PLEASE, look at my last post and provide me with clear instructions on how to accomplish the double dropdown using the information I have provided. I think it is very clear what I'm trying to do and what is happening. If it is not, please let me know what you need further explanation on.

Or, can you please pass this post on to Bob and see if he can help me?

Thanks

Jose
Max_admin 04 Dec, 2014
Hi Jose,

The advised way to control multiple events is to add them all inside a container of type div and show/hide the container instead.

Regarding the fields names, I'm not sure where did I write that, but unless the field name has square brackets which means that it will submit an array of values, only the last field value will be sent if you have multiple fields of the same name.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.