Adding a checkbox to a form

I'm modifying a form that adds a new place in kolimarfy's places extension.  This code does create a checkbox, but the value isn't being saved.  The underlying column is tinyint(1).

    'pl_permit' => array (

                'label' => 'Places Permit',
                'type' => 'checkbox',
                'required' => 1,
                'attrs' => array(
                 'checked' => 'unchecked',),
                'db' => 'pl_permit',
                'view' => 1,    
            )

thanks for any assistance!

Quote · 17 Oct 2012

[Topic Moved] if this is for purchased module, post questions in that modules support form if available;

(if this module)  http://www.boonex.com/forums/topic/Kolimarfey-Places.htm

(p.s) deleted all your duplicate posts (hitting submit many times...)

Quote · 17 Oct 2012

try this

'pl_permit' => array(

 'type' => 'checkbox',

 'name' => 'pl_permit',

 'caption' => 'Places Permit',

 'value' => 'on',

 'required' => true,

 'checked' => true,

 'db' => array(

'pass' => 'Xss'

),

 )

so much to do....
Quote · 17 Oct 2012

Sorry, that didn't work (errored).     I switched the column to varchar and this work except that it stores an integer :(

 

'pl_permit' => array(
                    'type' => 'select',
                    'required' => true,
                    'values' => array('unknown','yes','no'),
                    'value' => 'unknown',
                    'label' => 'Places Permit',
                    'display' => true,
                    'db' => 'pl_permit',
                    'view' => 1,
                ),

Quote · 17 Oct 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.