Checkbox Group only returning last value

dreamdest 14 Nov, 2014
I have a checkbox group on my form. when i have multiple choices, it only returns the last choice. I have added [] to the field name, and a handle arrays to the on submit, but it's still not working...
GreyHead 14 Nov, 2014
Hi dreamdest,

Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.

Note: if you are using the Easy Wizard you can turn on Debug on the Others tab in CFv4 or the Setup tab in CFv5.

Bob
dreamdest 14 Nov, 2014
How do you post the debug?? where can you find it? thanks !
dreamdest 14 Nov, 2014
Found it:

Debug Info

Array
(
)

Snippet of email:

What would you like to spend some of your time doing? Attractions

There were 3 items selected; Attractions was the last one.
GreyHead 14 Nov, 2014
HI dreamdest,

Please post the whole of the Debugger output here.

Thanks

Bob
dreamdest 15 Nov, 2014
The form is at: http://dreamdestinations.travel/index.php?option=com_chronoforms5&chronoform=Questionnaire
Debug:
Data Array
Array
(
    [option] => com_chronoforms5
    [chronoform] => Questionnaire
    [event] => submit
    [radio1] => 0
    [name1] => Jane Bride
    [Age1] => 26
    [cell1] => 917-555-1234
    [radio2] => 1
    [name2] => John Groom
    [age2] => 28
    [cell2] => 917-555-3333
    [email] => email@email.com
    [wedding_date] => 11/29/2014
    [travel_dates] => 12/1/2014 - 12/10/2014
    [departure_airport] => mia
    [preferred_area] => aruba - no hurricanes
    [other_destinations] => 
    [budget] => 10000
    [must_haves] => adults only
    [interests] => Attractions
    [night_activities] => See Shows
    [registry_interest] => 0
    [button44] => Submit
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
)
Max_admin 15 Nov, 2014
The checkboxes name is set to "interests" without brackets [], and this is why you get the last value only!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 15 Nov, 2014
Hi DreamDest,

As you can see Interests isn't showing up as an array.

And, looking at the form HTML, the name doesn't have the [] see for example
<input name="interests" id="interests22" class="A" title="" style="" data-load-state="" data-tooltip="" type="checkbox" value="Adventure">


Bob
dreamdest 15 Nov, 2014
I am posting the designer and the edit element captures - you can see that it DOES have the array..... :?

Checkbox Group only returning last value image 1
Checkbox Group only returning last value image 2
Max_admin 15 Nov, 2014
This is weird, and you don't have 2 forms with the same name ?

Do you have the latest update ? if yes then please take a form backup and send it either here or by the "Contact us" page.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
dreamdest 15 Nov, 2014
One other thing - I created a 'test' form with just one checkbox group question, and it works fine.:http://dreamdestinations.travel/index.php?option=com_chronoforms5&chronoform=test

The form where I have problems with the array, I am also having problems with fields that are 'required' - they are not displaying the asterisk, and you can submit the form with them being empty. This is my third form, so I somewhat know what I'm doing... is it possible for a form to get 'corrupted' ??
Max_admin 15 Nov, 2014
No, the form can't get corrupted, do you have the site cache ON ? please try testing with the cache disabled.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
dreamdest 15 Nov, 2014
Site Cache is off. Only one form with that name. I downloaded Chronoforms 3 weeks ago, so I'm guessing it's the latest version
dreamdest 15 Nov, 2014
When you look at the form, can you also see why the first 4 fields are required, but are not showing asterisks, and are being allowed to submit empty as well? Thanks again!
Max_admin 15 Nov, 2014
The link doesn't work, could you please attach the file here or send it using the "Contact us" page ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 15 Nov, 2014
Got it!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 15 Nov, 2014
Answer
Ok, under the "Code" tab you have set the form type to "Custom code", that will use the code in the box and will ignore any changes in the "Designer" section, please change that and save the form then try again!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
dreamdest 15 Nov, 2014
Thanks alot!!! that fixed the array as well as the required fields issue!!!
This topic is locked and no more replies can be posted.