With Piklist, you can easily create your own fields to use in your projects.
/parts
folder in your theme or plugin to put Piklist parts files./fields/
. The structure should look like /parts/fields/
./fields/
folder. Any files in this folder can become fields automatically registered with Piklist.my-checkbox.php
.piklist/parts/fields/checkbox.php
, copy everything and paste it into my-checkbox.php
.When using your new checkbox, use the type my-checkbox. It should look like this:
piklist('field', array(
'type' => 'my-checkbox', // custom field type
'field' => 'custom-checkbox',
'label' => 'Custom Select Field',
'choices' => array(
'first' => 'First Choice',
'second' => 'Second Choice',
'third' => 'Third Choice'
)
));
This documentation is a community effort. Please create an issue or pull request to help!