Use this field reference when creating custom forms for tasks, forms and contacts.
Form Fields
List of supported form field types. List shows field type, associated HTML form tag and description.
- checkbox - (CHECKBOX) Single checkbox field.
- date - (DATE) Date field.
- editor - (TEXTAREA/TinyMCE) WYSIWYG editor field.
- email - (EMAIL) E-mail input field.
- imgselect - (SELECT) Select one from available image file attachments.
- multiple - (CHECKBOX) Select from a range of predefined checkbox options.
- notes - (TEXTAREA) Plain multi-line text input.
- numeric - (TEXT) Input field for numbers.
- pwd - (PASSWORD) Password input field.
- radio - (RADIO) Pick one from range of options.
- range - (INPUT) Select a number from a fixed range of numbers.
- select - (SELECT) Select one from multiple options in select format.
- tel - (TEXT) Telephone input field with validation.
- text - (TEXT) Single line text input field.
- time - (TEXT) Time input field in 12-hour format.
- url - (YRL) Hyperlink input field.
- uselect - (SELECT) User select input field. Will vary on category permission.
- static - (N/A) Exposes pre-defined read-only data only.
- hidden - (INPUT) Adds a hidden INPUT field with preset data that is already defined in the field definition file. (v0.1.38)
Form Field Attributes
Field attributes are mechanisms to control how input fields are presented and validated.
- Field types and applicable attributes:
*tap on image to enlarge.
- Field types and applicable attributes:
Custom Form Primer
What's the difference between tasks and forms?
- A task includes priority levels, ownership and date constraints, example: project tasks and to-do lists.
A regular form doesn't include constraints, example: work portfolio, profiles, and general record keeping forms.
There are two kinds of regular forms: form and contact.
- The difference between the two is contact form is associated with contact list categories, while the standard form can be used on all other types of list. You can only use contact forms on contact lists.
How to create a custom form?
Create a new form field definition file.
- Make a copy of an existing field definition file in the task or form directory.
Give the file a unique name.
- For forms: "cmslist_fields_<unique name>.php"
- For tasks: cmslist_task_fields_<unique name>.php.
- This will become the name of the form.
Note:
- The unqiue name given to the file will become the form's selector in the form or task category admin screen.
- Keep the name short, between one to three words.
- Use an underscore to separate words.
- Use small letters, for alphanumeric names.
- Make a copy of an existing field definition file in the task or form directory.
Edit the fields of the new form.
- Remove the fields that are not needed.
- Add new fields you need.
- Change the labels, description and other attributes.
- Add form validation rules for each field, using Form Field Attributes as your guide.
Test the form.
Create a new category that will use the form.
- Task list can only use Task forms.
- Forms list can use either Forms or Contact forms.
- Create a new post without any content.
- Open the post to display the form.
- Click the Edit button to test the edit layout and validation rules.
How to make forms searchable?
- Name one field "details". This would be your descriptions or details field, where the most pertinent information about your form is entered.
- The 'details' form field is included in search queries.