10RUPTiV Posted February 7, 2014 Report Posted February 7, 2014 Any documentation about how works the "value" for some custom field type. For example, I try to add a custom field "Check Box" and have no idea for the "value" field. Quote
0 Michael Posted February 7, 2014 Report Posted February 7, 2014 I think 1 would be a value to have it ticked, and a 0 or leaving it blank will keep it unchecked. Quote
0 10RUPTiV Posted February 7, 2014 Author Report Posted February 7, 2014 Yeah that's what I thought too but how to enter it in the value field. Just 1 or something like 0|1 Quote
0 Michael Posted February 7, 2014 Report Posted February 7, 2014 I would just leave it blank, if they tick it, it should put a 1 in the database, but I could be wrong haha I just use textboxes. Quote
0 Tyson Posted February 7, 2014 Report Posted February 7, 2014 Custom field checkboxes only have one value--the value when the box is checked. You can set it to anything you like. If you leave the value blank, then the value stored will be blank when the box is checked. Quote
0 Michael Posted February 7, 2014 Report Posted February 7, 2014 Custom field checkboxes only have one value--the value when the box is checked. You can set it to anything you like. If you leave the value blank, then the value stored will be blank when the box is checked. Oh so if you put the value as "Checked" in the database if the user has checked it it will show labelname | checked Quote
0 velaware Posted February 7, 2014 Report Posted February 7, 2014 Oh so if you put the value as "Checked" in the database if the user has checked it it will show labelname | checked Give or take, yeah. Not sure about other fields but I found w/ checkboxes when they aren't checked there's not even a record for it in the database. Which, kind of makes sense. Michael 1 Quote
0 Tyson Posted February 7, 2014 Report Posted February 7, 2014 Give or take, yeah. Not sure about other fields but I found w/ checkboxes when they aren't checked there's not even a record for it in the database. Which, kind of makes sense. Unchecked checkboxes are not submitted via POST, so yes, there wouldn't even be a record of it. If there were, then to the OP's question, there would need to be a checked and unchecked value. Quote
Question
10RUPTiV
Any documentation about how works the "value" for some custom field type.
For example, I try to add a custom field "Check Box" and have no idea for the "value" field.
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.