Form Helper - "Checked" Question
Permalink 1 user found helpful
I'm sure a savvy C5'er can answer this in a couple seconds.
Using Form Helper to build the form_setup_html in my Block.
Using the checkbox helper function.
Want the checkbox to reflect "checked" status when user reopens Block in edit mode.
I can see the checkbox helper supports this.
But the checkbox in my form does not stay "checked" in Edit mode when the field value == 1.
My table is specifying the field an "I" (integer) and the database is being updated correctly based on the checkbox status (toggles correctly between 0 and 1).
It just doesn't retrieve the DB value in Edit mode and check the checkbox when the DB value == 1.
Any help appreciated.
--djn
Using Form Helper to build the form_setup_html in my Block.
Using the checkbox helper function.
Want the checkbox to reflect "checked" status when user reopens Block in edit mode.
I can see the checkbox helper supports this.
But the checkbox in my form does not stay "checked" in Edit mode when the field value == 1.
My table is specifying the field an "I" (integer) and the database is being updated correctly based on the checkbox status (toggles correctly between 0 and 1).
It just doesn't retrieve the DB value in Edit mode and check the checkbox when the DB value == 1.
Any help appreciated.
--djn
This would then work with the checkbox helper:
Unfortunately, if you use inc() to include the form_setup_html.php script, you lose the items in the local scope, unless you explicitly pass them in.
Could this be what's going on?