Cuisine Forms offers a lot of different field-types out-of-the box. Here are all available types, along with the way you can create ‘em with the Form Generator.
You’ll notice that you can just use Cuisine Core’s Field engine and pass those fields to the generator to create your forms from code.
A regular text-input.
Field::text( 'name', 'Label', $args )->render();
A html5 number-field. Auto-validates ‘is-number’
Field::number( 'name', 'Label', $args )->render();
A html5 email-field. Auto-validates e-mailadresses
Field::email( 'name', 'Label', $args )->render();
A multi-lined text input
Field::textarea( 'name', 'Label', $args )->render();
Creates a single checkbox. Returns true or false as a string.
Field::checkbox( 'name', 'Label', $args )->render();
Multiple checkboxes. Pass options as the third argument.
$options = array( 'option-one' => 'Option One', // value - label 'option-two' => 'Option Two', 'option-etc' => 'Etc.' ); Field::checkboxes( 'name', 'Label', $options, $args )->render();
Multiple radio-buttons. Pass options as the third argument.
$options = array( 'option-one' => 'Option One', // value - label 'option-two' => 'Option Two', 'option-etc' => 'Etc.' ); Field::radio( 'name', 'Label', $options, $args )->render();
A select-dropdown. Pass options as the third argument.
$options = array( 'option-one' => 'Option One', // value - label 'option-two' => 'Option Two', 'option-etc' => 'Etc.' ); Field::select( 'name', 'Label', $options, $args )->render();
Adds a wysiwyg editor-field. This isn’t the standard WordPress editor though, because that would be a bit
Field::editor( 'name', 'Label', $args )->render();
A date-field using jQuery-ui’s datepicker.
Field::date( 'name', 'Label', $args )->render();
A regular input-field hiding passwords being entered
Field::password( 'name', 'Label', $args )->render();
A regular file-input field.
Field::file( 'name', 'Label', $args )->render();
A hidden field. Ommits the ‘Label’ parameter.
Field::hidden( 'name', $args )->render();
This is actually three fields in your form: Street, zipcode and city.
Field::address( 'name', 'Label', $args )->render();