How to setup a field with multiple checkboxes

MatrixDonna 19 Dec, 2011
Hi there,

Using Joomla 1.5 with Chronoforms v4.

I have the following checkboxes group in my form:
Seminars you would like to attend: (with 3 options that are checkboxes)
Choice 1
Choice 2
Choice 3

My form isn't sending currently and the only difference between this form and another form of mine that is working is the use of checkboxes groups.

Reading your forum I picked up that I have to add the [] in the field settings somewhere. (I can't seem to find a definitive answer to how one has to go about this - will really appreciate your guidence on what I'm trying to do).

So I have the following settings under the General tab in this field:
Field name: Seminars
Label Texts: Seminars you would like to attend:
Checked value: 1
Options:
choice_1[]=Choice 1
choice_2[]=Choice 2
choice_3[]=Choice 3

And my Events tab has the following:
On Load: Show html
On Submit:
Handle Arrays
Email-email_form
Redirect User

Please tell me what I'm doing wrong?

Kind Regards
GreyHead 19 Dec, 2011
Hi MatrixDonna,

It's unlikely that not sending emails has a direct connection to using a checkbox group.

If you used the ChronoForms Wizard to build the Checkbox group then it will automatically have added the array name to the inputs - something like name="checkbox_group_0[]"

As you have done, you need to add a Handle Arrays action to convert the array back to a string to display in your email.

You do *not* need to add [] into the Options - please remove these.

What do you see when you add a Debugger action and Submit the form?

Bob
MatrixDonna 20 Dec, 2011
Hi there,

Thank you so much for getting back to me with some guidance!!!
This is what I get with the debug on:
I hope it makes sense to you - I'm not seeing anything funny accept that it says that an email has been sent when it hasn't. Oh and I've changed the email addresses just now😛
Data Array:
Array
(
[name] => Test
[email] => Test
[whomeet] => TEst
[whyattending] => TEst
[seminars] => choice 1,choice 3
[updates] => 1
[howhear] => choice 3
[comments] => Test
[input_submit_14] => Submit
[b5785c00c35acdf7df0b5883057a6f5b] => 1
[chronoform] => visitorform
[event] => submit
[Itemid] => 76
[option] => com_content
[view] => article
[id] => 34
)

Debug Data1. An email has been SENT successfully from (Web admin) [email]something@something.com.au[/email] to [email]something.something@something.com.au[/email]
Email template:

Name: Test Email: Test Who do you want to meet with: TEst Why are you attending: TEst Seminars you would like to attend: choice 1,choice 3 Sign up to receive updates: 1 How did you hear about the exhibition: choice 3 Your comments: Test Submitted by 218.185.1.106
GreyHead 20 Dec, 2011
Hi MatrixDonna,

Thanks for the info.

Most of the time the message "An email has been SENT successfully" means exactly that.

But successfully sent is not the same as successfully received. Many messages get dropped in between :-(

Does your site suvccessfuly send emails from other extensions?

I also suggest that you check the spam folders to see if the message is getting dropped on the way.

Bob
MatrixDonna 09 Jan, 2012
THANKS SOOO MUCH for getting back to me🙂

I couldn't get it working so I just created a new form from scratch and instead of using a checkbox set I manually set up a few single checkboxes which mean I didn't need the array thingy and now it works perfectly.

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