I am planning to implement ClassExtender very soon, but want to make sure I do it right the first time. Right now I am concerned about how to implement radio buttons and checkboxes, if possible.
Previously I checked the form to create the custom db and found the sample for text strings:
<field key="firstName" dbtype="varchar" precision="50" phptype="string" null="true"/>
But now I need other types of data, I assume I have to change the sample code. Going through some related files on Bob's website, here:
http://bobsguides.com/modx-object-full-reference.html, I find some interesting stuff.
Maybe this is what I need.
[dbtype] => int
[precision] => 10
[attributes] => unsigned
[phptype] => integer
[default] => 0
This also opens up the question of do I need the [attributes].
I also found this:
[dbtype] => tinyint
[precision] => 1
[phptype] => boolean
[attributes] => unsigned
[default] => 1
So these two would seem to solve the problem, the boolean is for radio buttons, and the integer can be used for checkboxes, or should I just use boolean for both...I guess boolean for both makes more sense, I am just asking users if they are interested in any of the following: movies, music, apples, space and whether they are in X group or Y group.
I guess integer would be suitable for age or years of experience.
I do want to get some confirmation before I experiment with this. Thanks!