Abilities

The following abilities are registered with the WordPress abilities-api.

NameLabelDescription
ws-form/formsList formsReturns a list of all of the forms in WS Form.
ws-form/form-create-jsonCreate form from a descriptionUse 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-jsonGet form in JSON formatReturns the form in JSON format by ID.
ws-form/form-update-jsonUpdate a form from a JSON stringUse 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-publishPublish formWhen 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-cloneClone formUse this tool to clone/copy/duplicate a form. The cloned form will be in a draft state.
ws-form/form-shortcodeGet form shortcodeGets a shortcode for a form in the WS Form form plugin for WordPress by form ID.
ws-form/form-blockGet form block markupGets 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-statsGet statistical data about a form by IDReturns 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-deleteDelete formTrash or permanently delete a form by ID.
ws-form/form-restoreRestore formRestore a form from the trash by ID.
ws-form/field-addAdd fieldUse 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-deleteDelete fieldUse this tool to delete a field from a form.