The following abilities are registered with the WordPress abilities-api.
| Name | Label | Description |
|---|---|---|
ws-form/forms | List forms | Returns a list of all of the forms in WS Form. |
ws-form/form-create-json | Create form from a description | Use this tool to create a new form from a description provided by the user. The tool generates the form using a JSON definition that must follow the required structure described in the json input property. |
ws-form/form-get-json | Get form in JSON format | Returns the form in JSON format by ID. |
ws-form/form-update-json | Update a form from a JSON string | Use this tool to modify an existing form using JSON data obtained from the form-get-json tool. To add a new field, use the field-add tool instead. The JSON provided must keep the same structure as returned by form-get-json, with no additions or removals of groups, sections, or fields. |
ws-form/form-publish | Publish form | When a form is created in WS Form it initially has a status of draft. Use this to publish a form by ID so that it can be used on a live web page. |
ws-form/form-clone | Clone form | Use this tool to clone/copy/duplicate a form. The cloned form will be in a draft state. |
ws-form/form-shortcode | Get form shortcode | Gets a shortcode for a form in the WS Form form plugin for WordPress by form ID. |
ws-form/form-block | Get form block markup | Gets the block markup for a form in WS Form by form ID. This should only be used for pages edited by the block editor (Gutenberg). |
ws-form/form-stats | Get statistical data about a form by ID | Returns statistical data about a form by ID including total views, saves, submissions as well as the total number of submission records and how many of those are unread. |
ws-form/form-delete | Delete form | Trash or permanently delete a form by ID. |
ws-form/form-restore | Restore form | Restore a form from the trash by ID. |
ws-form/field-add | Add field | Use this tool to add or insert a new field into a form. First, use the form-get-json tool to obtain the form JSON so you can specify the section_id where the field should be added, and optionally the field_id_before if you want it inserted before another field. |
ws-form/field-delete | Delete field | Use this tool to delete a field from a form. |