Use checked() and allow for defaulting checkbox on #142

Closed
wants to merge 17 commits into from

7 participants

@JPry

To set the checkbox default, set the 'std' item to true or 1.

Now uses the checked() function, per #139 request.

jaredatch and others added some commits Jan 20, 2012
jaredatch Oops! 1f25dff
@joehoyle joehoyle Version number 8aa362b
Jared Atchison Merge pull request #96 from joehoyle/patch-1
Version number
4724aab
@joehoyle joehoyle Support for setting the 'multiple' property. 53f98e1
Jared Atchison Merge pull request #98 from joehoyle/master
Allow setting 'multiple'
27a50e0
Jared Atchison typo 88875a8
@zamoose zamoose Sanitizing colorpickers so as to not give Farbtastic agita. 58a1865
Jared Atchison Merge pull request #131 from zamoose/master
Patch for Farbtastic colorpicker
3058a18
@zamoose zamoose Simplifying/condensing sanitizing code based on feedback from @GaryJones
.
6a5d1af
Jared Atchison Merge pull request #133 from zamoose/master
Condensing of sanitizing code as per @GaryJones
40f5660
@jtsternberg jtsternberg Add std ability to select type
the select type was missing the ability to set default options, so I
added it.
b347ebf
Jared Atchison Merge pull request #134 from jtsternberg/master
Please consider adding the 'std' ability to the select type.
40fbb59
@JPry JPry Use checked() and add ability to default checkbox on
To set the checkbox default, set the 'std' item to true or 1
ac031c1
@JPry JPry Merge branch 'master' into trunk bd5888f
@JPry JPry Fixed logic typo 03d04ea
@JPry JPry Fixed logic once more, added filter for checkbox validation
No really, I've got it working this time. Now you can set a default
"checked" status, and you can accurately test whether it's on or off
after that.
e846930
@pdewouters

hi
this doesn't result in the checkbox being checked by default

            array(
                'name' => 'Dsiplay on map',
                'desc' => 'check to display this location on the global map',
                'id' => $prefix . 'displayonmap',
                'std' => true,
                'type' => 'checkbox',
                
            ),
@JPry

@pdewouters Did you add the filter for cmb_validate_checkbox? It doesn't work without that filter.

@pdewouters

no. which filter?

@JPry

The one shown in my last commit: JPry@e846930

@pdewouters

thanks, for some reason I thought the code had been added to the core class

@Chovanec

thanks for this default checked solution

@jtsternberg

If this is still an issue post-1.0.0, feel free to submit another PR against the trunk branch.

@matyushen

This not working for me. Did something changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment