v1.3
Support for nested categories and taxonomies
Taxonomies which use nested hierarchies (i.e. parent/child terms) can now be displayed hierarchically by adding the option:
'nested' => true
to the field's configuration settings. This option is only supported for the 'taxonomy'
field type, and only works with select, multi-select, checkbox, and radio formats.
In select fields the nesting will be shown using dashes '-', while checkboxes and radio buttons will be displayed using nested <ul>
groups.
NOTE: This feature only works if you do not supply a custom 'values' array for the field, i.e. you must show all terms by default. But you can still use the 'exclude' option to hide certain terms if you need to. Excluding a term from the list will exclude that term AND all of its children when nesting is enabled.
Support for HTML5 field elements
Form fields can now use a variety of HTML5 field formats such as 'number', 'url', 'email', etc. You can set these formats in your fields' configuration array, like so:
'format' => 'number'
Support for including custom HTML before and after individual fields
It is now possible to include custom HTML before and after any individual form field, using the new options 'pre_html'
and 'post_html'
:
'pre_html' => '<h2>Some html before my field</h2>',
'post_html => '<span>Some custom html after my field</span>'
Ability to disable wrapper <div>
's on fields
Every form field generated by WPAS is wrapped in a <div>
element by default. This can now be disabled by setting the following constant:
define('WPAS_DISABLE_WRAPPERS', true);