Using checkboxes in custom Block Type add.php/edit.php form
Permalink
I am having some troubles getting the desired values from checkboxes in the edit.php/add.php files of my custom block type.
What I want is:
If it's checked return 1 if it's not checked return 0. These values should then be inserted into the corresponding column in the database. How is this handled in Concrete5?
Here's my code in add.php
Here's the corresponding part in db.xml:
What I want is:
If it's checked return 1 if it's not checked return 0. These values should then be inserted into the corresponding column in the database. How is this handled in Concrete5?
Here's my code in add.php
<div class="checkbox"> <label> <input type="checkbox" name="configArrows" value="1" > Arrow Navigation </label> </div>
Here's the corresponding part in db.xml:
<field name="configArrows" type="I1"> <default value="1"/> </field>
http://www.concrete5.org/community/forums/customizing_c5/form-check...