Hi, i'm using a checkbox group in my form with 6 possibilities but when i get the email, i only see the last choice selected.
I try to explain better:
[attachment=0]check.jpg[/attachment]
Even if i check two or more values, i'll obtain in my email only the last checked one.
I'have also insert "handle arrays" on submit just before email but without success.
The form is here
http://www.zerobugs.it/index.php/contatti#sono-un-operatore-professionale
and this is the html code:
Any idea?
Thank you.
I try to explain better:
[attachment=0]check.jpg[/attachment]
Even if i check two or more values, i'll obtain in my email only the last checked one.
I'have also insert "handle arrays" on submit just before email but without success.
The form is here
http://www.zerobugs.it/index.php/contatti#sono-un-operatore-professionale
and this is the html code:
<div class="form-group gcore-form-row" id="form-row-nomecognome"><label for="nomecognome" class="control-label gcore-label-left">Nome e Cognome</label>
<div class="gcore-input gcore-display-table" id="fin-nomecognome"><input name="nomecognome" id="nomecognome" value="" placeholder="" maxlength="" size="" class="validate['required'] form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" type="text" /></div></div><div class="form-group gcore-form-row" id="form-row-hotel"><label for="hotel" class="control-label gcore-label-left">Hotel</label>
<div class="gcore-input gcore-display-table" id="fin-hotel"><input name="hotel" id="hotel" value="" placeholder="" maxlength="" size="" class="form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" type="text" /></div></div><div class="form-group gcore-form-row" id="form-row-citta"><label for="citta" class="control-label gcore-label-left">Città</label>
<div class="gcore-input gcore-display-table" id="fin-citta"><input name="citta" id="citta" value="" placeholder="" maxlength="" size="" class="form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" type="text" /></div></div><div class="form-group gcore-form-row" id="form-row-email"><label for="email" class="control-label gcore-label-left">E-mail</label>
<div class="gcore-input gcore-display-table" id="fin-email"><input name="email" id="email" value="" placeholder="" maxlength="" size="" class="validate['required','email'] form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" type="text" /></div></div><div class="form-group gcore-form-row" id="form-row-telefono"><label for="telefono" class="control-label gcore-label-left">Telefono</label>
<div class="gcore-input gcore-display-table" id="fin-telefono"><input name="telefono" id="telefono" value="" placeholder="" maxlength="" size="" class="form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" type="text" /></div></div><div class="form-group gcore-form-row" id="form-row-interessi"><label for="interessi" class="control-label gcore-label-left gcore-label-checkbox">Sono interessato a</label>
<div class="gcore-input gcore-display-table" id="fin-interessi"><div class="gcore-single-column" id="fclmn"><div class="gcore-checkbox-item" id="fitem"><input name="interessi" id="interessi" class="A" title="" style="" data-load-state="" data-tooltip="" type="checkbox" value="Coprimaterassi" />
<label class="control-label gcore-label-checkbox" for="interessi">Coprimaterassi</label></div>
<div class="gcore-checkbox-item" id="fitem1"><input name="interessi" id="interessi1" class="A" title="" style="" data-load-state="" data-tooltip="" type="checkbox" value="Topper" />
<label class="control-label gcore-label-checkbox" for="interessi1">Topper</label></div>
<div class="gcore-checkbox-item" id="fitem2"><input name="interessi" id="interessi2" class="A" title="" style="" data-load-state="" data-tooltip="" type="checkbox" value="Copriguanciale" />
<label class="control-label gcore-label-checkbox" for="interessi2">Copriguanciale</label></div>
<div class="gcore-checkbox-item" id="fitem3"><input name="interessi" id="interessi3" class="A" title="" style="" data-load-state="" data-tooltip="" type="checkbox" value="AcarZeroBugs™ WALL" />
<label class="control-label gcore-label-checkbox" for="interessi3">AcarZeroBugs™ WALL</label></div>
<div class="gcore-checkbox-item" id="fitem4"><input name="interessi" id="interessi4" class="A" title="" style="" data-load-state="" data-tooltip="" type="checkbox" value="Visita agente di zona" />
<label class="control-label gcore-label-checkbox" for="interessi4">Visita agente di zona</label></div>
<div class="gcore-checkbox-item" id="fitem5"><input name="interessi" id="interessi5" class="A" title="" style="" data-load-state="" data-tooltip="" type="checkbox" value="altro (specificare)" />
<label class="control-label gcore-label-checkbox" for="interessi5">altro (specificare)</label></div></div></div></div><div class="form-group gcore-form-row" id="form-row-commenti"><label for="commenti" class="control-label gcore-label-left">Commenti</label>
<div class="gcore-input gcore-display-table" id="fin-commenti"><textarea name="commenti" id="commenti" placeholder="" rows="2" cols="40" class="form-control A" title="" style="" data-wysiwyg="0" data-load-state="" data-tooltip=""></textarea></div></div><div class="form-group gcore-form-row" id="form-row-custom"><label for="custom" class="control-label gcore-label-left">privacy</label>
<div class="gcore-input gcore-display-table" id="fin-custom">Ho preso visione <a href="index.php?option=com_content&view=article&id=128&Itemid=1093" target="_blank">dell'informativa sulla privacy di ZeroBugs™</a> ed acconsento al trattamento dei miei dati personali allo scopo di processare la mia richiesta.</div></div><div class="form-group gcore-form-row" id="form-row-checkbox6"><div class="gcore-input gcore-display-table" id="fin-checkbox6"><div class="gcore-checkbox-item" id="fitem6"><input name="checkbox6" id="checkbox6" value="1" class="validate['required'] A" title="" style="" data-load-state="" data-tooltip="" type="checkbox" />
<label class="control-label gcore-label-checkbox" for="checkbox6">Acconsento</label></div></div></div><div class="form-group gcore-form-row" id="form-row-button7"><div class="gcore-input gcore-display-table" id="fin-button7"><input name="button7" id="button7" type="submit" value="Invia" class="btn btn-default form-control A" style="" data-load-state="" /></div></div>
Any idea?
Thank you.
Hello emanuele@damconsulting.it,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How do I build a select drop-down, radio button or checkbox group?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How do I build a select drop-down, radio button or checkbox group?
P.S: I'm just an automated service😉
Hi emanuele,
Just add a "handle arrays" action above the "Email" action in your "submit" event area.
Regards,
Max
Just add a "handle arrays" action above the "Email" action in your "submit" event area.
Regards,
Max
Hi emanuele,
I see you already have the Handle Arrays action, please change the name of the Checkbox group to interessi[] with the [] at the end.
Bob
I see you already have the Handle Arrays action, please change the name of the Checkbox group to interessi[] with the [] at the end.
Bob
I have a checkbox group field named, literature_choice.
My options are:
WW trailer=Weekend Warrior Trailer
WW 5th wheel=Weekend Warrior 5th Wheel
Azur=Avion Azur Class B Motorhome
Strada=Avion Strada Luxury Touring
I have handle arrays above the email in on submit.
In the email template I have {literature_choice}
I only receive one result in my email no mater how many choice are checked. What am I doing wrong? Thanks
My options are:
WW trailer=Weekend Warrior Trailer
WW 5th wheel=Weekend Warrior 5th Wheel
Azur=Avion Azur Class B Motorhome
Strada=Avion Strada Luxury Touring
I have handle arrays above the email in on submit.
In the email template I have {literature_choice}
I only receive one result in my email no mater how many choice are checked. What am I doing wrong? Thanks
Hi edkiefer,
Please see my post immediately before yours and change the name to literature_choice[]
Bob
Please see my post immediately before yours and change the name to literature_choice[]
Bob
I was running into the same problem but resolved it by adding the [] at the end of the variable name as you indicated.
What about when I want to retrieve data to populate the form? In DB Read if I use [] at the end of the respective field names and test the form, I get a 1054 - Unknown Column error.
What about when I want to retrieve data to populate the form? In DB Read if I use [] at the end of the respective field names and test the form, I get a 1054 - Unknown Column error.
Hi jmahun,
Please drag a Handle Arrays action into the OnSubmit event and move it up before the DB Save action.
Bob
Please drag a Handle Arrays action into the OnSubmit event and move it up before the DB Save action.
Bob
Wait, now I'm confused.
I'm using two forms, one to collect date, the second to show data pulled from the database.
In the first form I have a Handle Array before my DB Save action.That appears to work correctly.
In the second form I have a DB Read action to pull the data. Do you mean I should add a Handle Arrays action here also?
I'm using two forms, one to collect date, the second to show data pulled from the database.
In the first form I have a Handle Array before my DB Save action.That appears to work correctly.
In the second form I have a DB Read action to pull the data. Do you mean I should add a Handle Arrays action here also?
Hi jmahun,
We'll get there . . .
The Handle Arrays action converts an array to a string so you need it before a DB Save or Email.
When you re-load the data with a DB Read you need to convert a string back into an array. In CFv4 the DB Record Loader action could do that for specified columns. Unfortunately it seems to have got lost in CFv5 so you need to use a Custom Code action instead
Bob
We'll get there . . .
The Handle Arrays action converts an array to a string so you need it before a DB Save or Email.
When you re-load the data with a DB Read you need to convert a string back into an array. In CFv4 the DB Record Loader action could do that for specified columns. Unfortunately it seems to have got lost in CFv5 so you need to use a Custom Code action instead
<?php
$form->data['column_name'] = explode(', ', $form->data['column_name']);
?>
assuming that you have used comma+space as the string separator.
Bob
This post was very helpful - thanks.
Is there a way to add a space or a return between the choices that come into the email they come in like the below, with no space between the selection:
Meeting Date(s): October 22,November 19
Thank you!
Is there a way to add a space or a return between the choices that come into the email they come in like the below, with no space between the selection:
Meeting Date(s): October 22,November 19
Thank you!
Hi LikeStuff,
Use comma+space as the string separator in the Handle Arrays action.
Bob
Use comma+space as the string separator in the Handle Arrays action.
Bob
I don't now where I have put the [] to receive the different choises of the checkbox in the email.
This is how it is now:
type="text" /></div></div><div class="form-group gcore-form-row" id="form-row-artikelen"><label for="artikelen" class="control-label gcore-label-left gcore-label-checkbox">Staat op beurs met:</label>
<div class="gcore-input gcore-display-table" id="fin-artikelen"><div class="gcore-multiple-column" id="fclmn1"><div class="gcore-checkbox-item" id="fitem2"><input name="artikelen" id="artikelen" class="validate['group:10'] A" title="" style="" data-load-state="" data-tooltip="Geef aan met wat u op de beurs staat" type="checkbox" value="Hagedissen" />
<label class="control-label gcore-label-checkbox" for="artikelen">Hagedissen</label></div>
<div class="gcore-checkbox-item" id="fitem3"><input name="artikelen" id="artikelen1" class="validate['group:10'] A" title="" style="" data-load-state="" data-tooltip="Geef aan met wat u op de beurs staat" type="checkbox" value="Slangen" />
<label class="control-label gcore-label-checkbox" for="artikelen1">Slangen</label></div>
<div class="gcore-checkbox-item" id="fitem4"><input name="artikelen" id="artikelen2" class="validate['group:10'] A" title="" style="" data-load-state="" data-tooltip="Geef aan met wat u op de beurs staat" type="checkbox" value="Amfibieën" />
<label class="control-label gcore-label-checkbox" for="artikelen2">Amfibieën</label></div>
<div class="gcore-checkbox-item" id="fitem5"><input name="artikelen" id="artikelen3" class="validate['group:10'] A" title="" style="" data-load-state="" data-tooltip="Geef aan met wat u op de beurs staat" type="checkbox" value="Voedseldieren" />
<label class="control-label gcore-label-checkbox" for="artikelen3">Voedseldieren</label></div>
<div class="gcore-checkbox-item" id="fitem6"><input name="artikelen" id="artikelen4" class="validate['group:10'] A" title="" style="" data-load-state="" data-tooltip="Geef aan met wat u op de beurs staat" type="checkbox" value="Materiaal" />
<label class="control-label gcore-label-checkbox" for="artikelen4">Materiaal</label></div></div></div></div><div class="form-group gcore-form-row"
This is how it is now:
type="text" /></div></div><div class="form-group gcore-form-row" id="form-row-artikelen"><label for="artikelen" class="control-label gcore-label-left gcore-label-checkbox">Staat op beurs met:</label>
<div class="gcore-input gcore-display-table" id="fin-artikelen"><div class="gcore-multiple-column" id="fclmn1"><div class="gcore-checkbox-item" id="fitem2"><input name="artikelen" id="artikelen" class="validate['group:10'] A" title="" style="" data-load-state="" data-tooltip="Geef aan met wat u op de beurs staat" type="checkbox" value="Hagedissen" />
<label class="control-label gcore-label-checkbox" for="artikelen">Hagedissen</label></div>
<div class="gcore-checkbox-item" id="fitem3"><input name="artikelen" id="artikelen1" class="validate['group:10'] A" title="" style="" data-load-state="" data-tooltip="Geef aan met wat u op de beurs staat" type="checkbox" value="Slangen" />
<label class="control-label gcore-label-checkbox" for="artikelen1">Slangen</label></div>
<div class="gcore-checkbox-item" id="fitem4"><input name="artikelen" id="artikelen2" class="validate['group:10'] A" title="" style="" data-load-state="" data-tooltip="Geef aan met wat u op de beurs staat" type="checkbox" value="Amfibieën" />
<label class="control-label gcore-label-checkbox" for="artikelen2">Amfibieën</label></div>
<div class="gcore-checkbox-item" id="fitem5"><input name="artikelen" id="artikelen3" class="validate['group:10'] A" title="" style="" data-load-state="" data-tooltip="Geef aan met wat u op de beurs staat" type="checkbox" value="Voedseldieren" />
<label class="control-label gcore-label-checkbox" for="artikelen3">Voedseldieren</label></div>
<div class="gcore-checkbox-item" id="fitem6"><input name="artikelen" id="artikelen4" class="validate['group:10'] A" title="" style="" data-load-state="" data-tooltip="Geef aan met wat u op de beurs staat" type="checkbox" value="Materiaal" />
<label class="control-label gcore-label-checkbox" for="artikelen4">Materiaal</label></div></div></div></div><div class="form-group gcore-form-row"
Hey Bob,
I placed the [] here:
input name="artikelen[]" id="artikelen"
but after saving the form, and I cheque it again the [] is no longer there???
what can I do wrong?
Renaat
I placed the [] here:
input name="artikelen[]" id="artikelen"
but after saving the form, and I cheque it again the [] is no longer there???
what can I do wrong?
Renaat
Hi jmahun,
Where exactly did you put it?
Normally you'd change the element settings in the Designer tab. If you changed the code in the Code tab that will be ignored (unless you choose to set the Form Type there to Custom - which I don't recommend).
Bob
Where exactly did you put it?
Normally you'd change the element settings in the Designer tab. If you changed the code in the Code tab that will be ignored (unless you choose to set the Form Type there to Custom - which I don't recommend).
Bob
Hi Bob,
I tried it in the Code Tab, that don't work as you say. When I did it in the Designer tab, olso no result, so I deleted it and made a new checkbox group, and than it worked.
Thank you for the help.
Now gonne trie to insert a database and make that work
And searching to make the form in different languages.
Are there topics for?
Thank you very mutch
Renaat
I tried it in the Code Tab, that don't work as you say. When I did it in the Designer tab, olso no result, so I deleted it and made a new checkbox group, and than it worked.
Thank you for the help.
Now gonne trie to insert a database and make that work
And searching to make the form in different languages.
Are there topics for?
Thank you very mutch
Renaat
Hi GreyHead,
Can this work for Google Spreadsheet saves too? Currently, I have a field called GSheet[Training], do I change this to GSheet[Training][]?
Thanks!
Albert
Can this work for Google Spreadsheet saves too? Currently, I have a field called GSheet[Training], do I change this to GSheet[Training][]?
Thanks!
Albert
This topic is locked and no more replies can be posted.