dynamic form and checkboxes not saving the value entered

antonio
Posts: 77
Joined: 2010-09-28 11:48

dynamic form and checkboxes not saving the value entered

Post by antonio » 2014-06-20 09:28

Hi all,
Perhaps I'm the last one that is still using ADDT or MX Kollection Pro.
Anyway, I try to post here my problem:
I have a dynamic form with 10 checkboxes.
Every checkbox should get a different value when checked.
i.e.:
checkbox1: when checked the value should be 1;
checkbox2: when checked the value should be 2;
checkbox3: when checked the value should be 3;
checkbox4: when checked the value should be 4;
checkbox5: when checked the value should be 5;
checkbox6: when checked the value should be 6;
checkbox7: when checked the value should be 7;
checkbox8: when checked the value should be 8;
checkbox9: when checked the value should be 9;
checkbox10: when checked the value should be 10;

But ADDT saves in the database the value as 1 (when checked) and 0 (not checked) for every checkbox.
Is this a bug?
How can I solve this? I badly need to save a custom value when a checkbox is checked.

Thanks to anyone that will help me.

Tony

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: dynamic form and checkboxes not saving the value entered

Post by Fred » 2014-06-21 12:34

Tony it should work.
Check the values of the actual box when ticked is what you want.
Check the default value of the form itself
Check the value is submitted as numeric
Check the database and see if it can accept the value you are posting.

Use something like dev toolkit in firefox to check the value of the selected form element before submitting.

User avatar
Timespider
Posts: 37
Joined: 2010-02-16 22:15
Location: Auckland - New Zealand

Re: dynamic form and checkboxes not saving the value entered

Post by Timespider » 2014-06-22 21:38

Hi Antonio, yes follow Fred's instructions, I don't use addt but have lately used multiple check-boxes in Kollection pro & they are working fine. Check manually that each check box has the checked value you expect like 1,2,3 & so on. If they do & the data is going into the DB, it is likely to be at the DB. Like Fred said make sure the DB column is set to numeric. :)
Motto: STUPID HURTS

antonio
Posts: 77
Joined: 2010-09-28 11:48

Re: dynamic form and checkboxes not saving the value entered

Post by antonio » 2014-06-23 08:47

Hi Fred and all,
thanks for your reply.
I tried all of your suggestions but the checkboxes still insist in putting only 1 or 0 in the db, whatever value I specify when ticked.
The checkbox default are all 0 and when thicked they should assume another value.
The db field are set to INT(5).
But the only value they get is 0 or 1 :(
The dreamweaver default checkboxes work as expected but I loose the ADDT facilities.
So, I'm using ADDT menus instead of checkboxes. Not so elegant but it works.
Thanks to all for your help.

tony

User avatar
Timespider
Posts: 37
Joined: 2010-02-16 22:15
Location: Auckland - New Zealand

Re: dynamic form and checkboxes not saving the value entered

Post by Timespider » 2014-06-23 10:02

Are you sure they are not set to true or false. Do you have a url we can look at. And by the way you are not the last to use Kollection/addt, I use Kollection all the time.
Motto: STUPID HURTS

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: dynamic form and checkboxes not saving the value entered

Post by Fred » 2014-06-29 21:29

Not a possibility that you are the last to use ADDT or Interakt.
Lost of people still using it.

See if you can duplicate the issue on a page that we can access and we will help solve the issue because it is working.
What functionality are you loosing?

ADDT / Interakt is simply reading a value from a form variable and stick it into a query.
So whether you use DW or ADDT checkboxes it is in essence the same.

Can you copy the bits of code where you use the boxes?

Post Reply