Buy Now
Sign in

Checkbox value

webcrea , July 23 at 12:38
webcrea
hi,
Where indicate value should be 1 when checkbox is cheked ?
Knowing that value come from the DB and her current value is {var:read_data11.user.politiquement_expose}
Ghost activated with value 0
thanks
Christophe
http://www.webcrea.fr
GreyHead
HI Chistophe,
You set the default value in the Value box of the Checkbox element.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
webcrea
Hello Bob,
And where i put the value from db please?
{var:read_data11.user.politiquement_expose}
Regards
Christophe
http://www.webcrea.fr
healyhatman
OK so in the value box of the checkbox put 1​
​​
​In your event BEFORE you display the section, do a custom code with
{data.set:checkbox_name$(var:read_data11.user.politiquement_expose)}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
webcrea
Thanks Healy,
I understand but there is not a more easy possibility to informe the value.
@Max : this is an issue to solve
I have many checkbox to manage.
Thanks for all
Christophe
http://www.webcrea.fr
healyhatman
If you want the VALUE to be set by a database read, put it in the value box.
If you want to programmatically set whether or not the checkbox is checked, you'll just have to do what I said.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
webcrea
Hello,
Sorry but if i post this, that's because this solution doesn't work!
Value is the value takes the input if checked not the real value.
regards
Christophe
http://www.webcrea.fr
healyhatman
Sorry I don't understand.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
healyhatman
After checking more, there's a "checked status provider" field under Advanced.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
webcrea
Yes I saw and i tried several code provider but nothing plays well
Christophe
http://www.webcrea.fr
healyhatman
Your provider will probably need to return either true/false or 1/0 to work.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
webcrea
{var:read_data11.user.politiquement_expose}
return 0 or 1
Christophe
http://www.webcrea.fr
healyhatman
Actually no just tested it out. As long as your provider isn't returning 0, any value should check the box.
So put in (type it out don't copy paste)
{var:read_data11.user.politiquement_expose}
if that's what you want to use of course.
Just make sure you use debugged to check what value politiquement_expose is actually returning.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
healyhatman
OK so if it returns 0 or 1, what's the problem? When it returns 1 is it NOT checking the box? And you've checked the debug output to make sure of the value?
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
webcrea
yes
When it returns 1 is it NOT checking the box
Christophe
http://www.webcrea.fr
healyhatman
PM me login details and I'll have a look
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
webcrea
affacé
Christophe
http://www.webcrea.fr
webcrea
In final,
To save and use data from checkbox you have to :
In General
- field_name
- value : 1
In Advanced
- Activate ghost
- Value on 1
- Checked status provider : {var:read_data11.user.field_name}
- Data value : {var:read_data11.user.field_name}
Christophe
http://www.webcrea.fr