Forums

Checkboxes not saving in DB

kingb 04 Sep, 2011
Hi

I'm using j1.7 and Chronoform 4.0 RC2.0

The db field is: membership_type and I'm seeing proper URL encoded values in the POST ( membership_type%5B%5D=1&membership_type%5B%5D=3&membership_type%5B%5D=4&membership_amount= )

However, as in previous versions, I can't see any place where field are listed to use in the insert statement. I've also tried a few things found in other posts (e.g. disable/enable DB save, etc...)

Everything else is saving to the db, just not the dang checkboxes....

Any ideas....?

Thanks
-Kevin
GreyHead 04 Sep, 2011
Hi Kevin,

The fact that you are seeing URL Encoded values suggests that they aren't in the $_POST array but in the $_GET array instead? Is the Form Method set to Post or to Get?

If I decode them I can see that they are array results
membership_type[]=1&membership_type[]=3&membership_type[]=4&membership_amount=
.

Try dragging in a Handle Arrays action to the OnSubmit Event and move ut up before the DB Save action.

Bob
kingb 04 Sep, 2011
Hi Bob

Nah - it was the post values, I was looking at them in Firebug's "Net" tab.

You were right it was the "Handle Arrays" action that was missing in the "On Submit"

Cheers! This beer's on me ;-)
- Kevin
This topic is locked and no more replies can be posted.