Forums

How to use the events etc for making a dynamic form

stefandeblock 02 Oct, 2016
Hi

I was used to the older version of chronoform..so this is a hell of a change. I'm building a new website, and decided to use the follow up of the older chronoform.

This is wat i want :

- Open a form
- in the form you can put basic information (like name, email)
- There should be e a dropdown menu that when selected alternates other field that are shown.
- I want a selection like "casual information" which gives some field like a textbox
- i want a selection like "membership" which gives a extra field : "information" (with som other fields) , " register" ; mutation
- I want a selection like "match information" etc.

So the main goal is to have a form that based on the first dropdown lets hide or appaear other fields. Im really strugling to get a good start. I'm not in code; so.... can someone help ?
stefandeblock 02 Oct, 2016
As a extra option🙂 ; i want that when depending on the first dropdown selection the form will be mailed to different email adesses
GreyHead 03 Oct, 2016
Hi stefandeblock,

You can use the Events tab in the select drop-down element to show/hide other form elements. Normally you will want to use the Show Parent / Hide Parent option. You can show/hide several elements at the same time by putting them into a Container of Type fieldset or div.

To send emails to different addresses please see this FAQ

Bob
stefandeblock 03 Oct, 2016
Thnx.. I will buy you that coffee!

One more question.. I put more fields in a container. What is the right event line

Do i set the value selected = my choice in the dropdown with show and hide parent and element id the name of container ?
GreyHead 04 Oct, 2016
Hi stefandeblock,

Yes, give the container a meaningful name and id and use that in the Event tab.

Bob
stefandeblock 08 Oct, 2016
Hi

seems that this :
To send emails to different addresses please see this FAQ

is not available anymoren ?
GreyHead 09 Oct, 2016
Hi stefandeblock,

It is working again now.

Bob
stefandeblock 10 Oct, 2016
Hi

bought you a coffee; can you help. Still getting a mail error :

Mailer Error: You must provide at least one recipient email address.

Thank you!
Data Array

Array
(
[option] => com_chronoforms5
[chronoform] => Contactformulier_advanced_3
[event] => submit
[ontvangers] => Algemene informatie
[voornaam] => voornaam
[achternaam] => achternaam
[email] => email
[onderwerp] => test
[bericht] => test
[vraagwedstrijdinformatie] => een wedstrijd georganiseerd door RKHAV
[berichtwedstrijdinformatie] =>
[vraaglidmaatschap] => Informatie over het lidmaatschap
[leeftijdcategorie] => Jeugd (11 jaar of jonger)
[berichtlidmaatschap] =>
[soortlidmaatschap] => Jeugd (11 jaar of jonger)
[straat] => straat
[nummer] => nummer
[postcode] => postcode
[woonplaats] => woonplaats
[land] =>
[geslacht] =>
[geboortedatum] => geboortedatum
[telefoonnummer] => telefoonnummer
[mobiel] => mobiel
[lidgeweestvan] =>
[naamvereniging] => naam vereniging
[berichtsponsoring] =>
[berichttrainingen] =>
[berichtvrijwilligers] =>
[captcha] =>
[submit6] => Verzenden
[email_to_use] => info@rkhav.nl
[ip_address] => 86.86.164.109
)

Array
(
)

Errors

Array
(
)

Debug Info

Array
(
[1] => Array
(
[Email] => Array
(
[0] => An email with the details below was sent successfully:
[1] => To:info@rkhav.nl
[2] => Subject:Contactformulier
[3] => From name:RKHAV Contact formulier
[4] => From email:info@rkhav.nl
[5] => CC:
[6] => BCC:
[7] => Reply name:
[8] => Reply email:
[9] => Attachments:
[10] => Array
(
)

[11] => Body:
<div class="gform-all">
<table class="gform-section" style="height: 314px;" width="470">
<tbody>
<tr id="ftr8" class="gform-line-tr">
<td id="ftd7" class="gform-line-td">
<div id="fin6" class="gform-input-container gform-input">Naam
<div id="fitem3" class="gform-input-container gform-subinput-container-wide">voornaamVoornaam</div>
<div id="fitem5" class="gform-input-container gform-subinput-container-wide">achternaamAchternaam</div>
</div>
</td>
</tr>
<tr id="ftr-email" class="gform-line-tr">
<td id="ftd-email" class="gform-line-td"><label class="gform-label-left" for="email">Email</label>
<div id="fin-email" class="gform-input-container gform-input">email</div>
</td>
</tr>
<tr id="ftr-phone" class="gform-line-tr">
<td id="ftd-phone" class="gform-line-td">Onderwerp test</td>
</tr>
<tr id="ftr28" class="gform-line-tr">
<td id="ftd27" class="gform-line-td">
<div id="fin26" class="gform-input-container gform-input"><label class="gform-label-left" for="address">Address</label>
<div id="fitem19" class="gform-input-container gform-subinput-container-wide"><label class="gform-sub-label" for="address">Street</label></div>
<div id="fitem21" class="gform-input-container gform-subinput-container-wide"><label class="gform-sub-label" for="city">City</label></div>
<div id="fitem23" class="gform-input-container gform-subinput-container-wide"><label class="gform-sub-label" for="state">State</label></div>
<div id="fitem25" class="gform-input-container gform-subinput-container-wide"><label class="gform-sub-label" for="zip">Zip</label></div>
</div>
</td>
</tr>
<tr id="ftr-message" class="gform-line-tr">
<td id="ftd-message" class="gform-line-td"><label class="gform-label-left" for="message">Message</label>
<div id="fin-message" class="gform-input-container gform-input">test</div>
</td>
</tr>
<tr id="ftr39" class="gform-line-tr">
<td id="ftd38" class="gform-line-td"><label class="gform-label-left" for="fld32">Enter the code</label>
<div id="fin37" class="gform-input-container gform-input">
<div id="fitem34" class="gform-input-container gform-subinput-container-wide"></div>
<div id="fitem36" class="gform-input-container gform-subinput-container-wide"></div>
</div>
</td>
</tr>
<tr id="ftr-submit6" class="gform-line-tr">
<td id="ftd-submit6" class="gform-line-td"> </td>
</tr>
</tbody>
</table>
</div><br /><br />IP: 86.86.164.109
)

)

[3] => Array
(
[Email] => Array
(
[0] => An email with the details below could NOT be sent:
[1] => To:email
[2] => Subject:Thank you for contacting us
[3] => From name:RKHAV
[4] => From email:info@rkhav.nl
[5] => CC:
[6] => BCC:
[7] => Reply name:
[8] => Reply email:info@rkhav.nl
[9] => Attachments:
[10] => Array
(
)

[11] => Body:
<div class="gform-all"><table class="gform-section"><tr class="gform-line-tr" id="ftr8"><td class="gform-line-td" id="ftd7">
<div class="gform-input-container gform-input" id="fin6"><label for="first_name" class="gform-label-left">Name</label>
<div class="gform-input-container gform-subinput-container-wide" id="fitem3"><label for="first_name" class="gform-sub-label">First</label></div>

<div class="gform-input-container gform-subinput-container-wide" id="fitem5"><label for="last_name" class="gform-sub-label">Last</label></div></div></td></tr><tr class="gform-line-tr" id="ftr-email"><td class="gform-line-td" id="ftd-email"><label for="email" class="gform-label-left">Email</label>
<div class="gform-input-container gform-input" id="fin-email">email</div></td></tr><tr class="gform-line-tr" id="ftr-phone"><td class="gform-line-td" id="ftd-phone"><label for="phone" class="gform-label-left">Phone</label>
<div class="gform-input-container gform-input" id="fin-phone"></div></td></tr><tr class="gform-line-tr" id="ftr28"><td class="gform-line-td" id="ftd27">
<div class="gform-input-container gform-input" id="fin26"><label for="address" class="gform-label-left">Address</label>
<div class="gform-input-container gform-subinput-container-wide" id="fitem19"><label for="address" class="gform-sub-label">Street</label></div>

<div class="gform-input-container gform-subinput-container-wide" id="fitem21"><label for="city" class="gform-sub-label">City</label></div>

<div class="gform-input-container gform-subinput-container-wide" id="fitem23"><label for="state" class="gform-sub-label">State</label></div>

<div class="gform-input-container gform-subinput-container-wide" id="fitem25"><label for="zip" class="gform-sub-label">Zip</label></div></div></td></tr><tr class="gform-line-tr" id="ftr-message"><td class="gform-line-td" id="ftd-message"><label for="message" class="gform-label-left">Message</label>
<div class="gform-input-container gform-input" id="fin-message"></div></td></tr><tr class="gform-line-tr" id="ftr39"><td class="gform-line-td" id="ftd38"><label for="fld32" class="gform-label-left">Enter the code</label>
<div class="gform-input-container gform-input" id="fin37">
<div class="gform-input-container gform-subinput-container-wide" id="fitem34"></div>

<div class="gform-input-container gform-subinput-container-wide" id="fitem36"></div></div></td></tr><tr class="gform-line-tr" id="ftr-submit6"><td class="gform-line-td" id="ftd-submit6">
<div class="gform-input-container gform-input" id="fin-submit6"></div></td></tr></table></div><br /><br />IP: 86.86.164.109
)

)

)
stefandeblock 10 Oct, 2016
mail is going to different receivers, only sender doesn't work
GreyHead 11 Oct, 2016
Hi stefandeblock,

Please see this FAQ - in your Debugger lists the To and From Email addresses are the same.

Bob
This topic is locked and no more replies can be posted.