Abilities

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

NameLabelDescription
ws-form/action-addAdd actionAdd a form action such as a Send Email notification. Prefer this over form-update-json for adding notifications. For the person completing the form, set meta.to to #field(id) for their email field. Returns a stable row_id.
ws-form/action-deleteDelete actionDelete an action by row_id (preferred), index, or unique label_match. Cannot delete the last email, message, or database action.
ws-form/action-updateUpdate actionUpdate an action by row_id (preferred), index, or unique label_match. Use the actions tool first. Prefer this for editing email notifications.
ws-form/actionsList actionsReturns form actions (including Send Email notifications) with row_id, index, type id, label, and meta_summary. Prefer row_id for action-update and action-delete. Form notifications are Send Email actions, not form settings.
ws-form/conditional-addAdd conditionalAdd a conditional logic rule. Use the same AI shape as form-create-json conditionals. Action targets use action row_id from the actions tool.
ws-form/conditional-deleteDelete conditionalDelete a conditional by row_id (preferred), index, or unique label_match. Use the conditionals tool first.
ws-form/conditional-updateUpdate conditionalReplace a conditional by row_id (preferred), index, or unique label_match. Pass the full conditional object in AI shape.
ws-form/conditionalsList conditionalsReturns form conditionals with row_id, index, label, and a short IF/THEN summary. Prefer row_id for conditional-update and conditional-delete.
ws-form/field-addAdd fieldUse this tool to add or insert a new field into a form. Use the sections or fields tools (or form-get-json) to get section_id, and optionally field_id_before to insert before another field.
ws-form/field-deleteDelete fieldUse this tool to delete a field from a form.
ws-form/field-updateUpdate fieldUse this tool to update an existing field label and/or meta (required, placeholder, help, options, etc.). Prefer this over form-update-json for single-field changes. Field type cannot be changed. Use the fields tool to find field IDs, or form-get-json for full field meta.
ws-form/fieldsList fieldsReturns all fields for a form with id, label, type, section_id, and group_id. Prefer this over form-get-json when you only need to find field IDs for field-update, field-delete, or field-add.
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-cloneClone formUse this tool to clone/copy/duplicate a form. The cloned form will be in a draft state.
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. Form email notifications are Send Email actions in the actions array, not form settings.
ws-form/form-deleteDelete formTrash or permanently delete a form by ID.
ws-form/form-draftDraft formSet a published form back to draft by ID. Draft forms cannot be used on live web pages until they are published again.
ws-form/form-get-jsonGet form in JSON formatReturns the form in JSON format by ID, including fields, actions, and conditionals. Form email notifications are Send Email actions in the actions array (not form settings). Use with form-update-json to edit notifications.
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-restoreRestore formRestore a form from the trash by ID.
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-statsGet statistical data about a form by IDReturns statistical data about a form by ID including total views, saves, submissions, daily figures, as well as the total number of submission records and how many of those are unread.
ws-form/form-update-jsonUpdate a form from a JSON stringUse this tool to modify an existing form using JSON from form-get-json. Prefer field-update for single-field label or meta changes. Use this tool to add or edit form email notifications by updating the actions array (Send Email actions). Notifications are not in form settings. To email the person completing the form, set an email action meta.to to #field(id) for their email field. To add a new field, use field-add instead. Keep the same groups/sections/fields structure. When actions or conditionals are included, they replace the form actions or conditionals.
ws-form/formsList formsReturns a list of all of the forms in WS Form.
ws-form/section-addAdd sectionAdd a section to a tab. Use tabs to get group_id (tab id), and sections if inserting before another section.
ws-form/section-deleteDelete sectionPermanently delete a section and its fields. Cannot delete the last section on a tab. Use the sections tool to get section IDs.
ws-form/section-updateUpdate sectionUpdate a section label and/or meta (label_render). Use the sections tool to get section IDs.
ws-form/sectionsList sectionsReturns all sections for a form with id, label, parent group_id (tab id), and index. Use with section-update, section-delete, and field-add.
ws-form/submission-getGet submissionReturns a single submission by ID including its field values.
ws-form/submission-note-createCreate submission noteCreates a note on a submission.
ws-form/submission-note-deleteDelete submission noteDeletes a submission note by ID.
ws-form/submission-note-updateUpdate submission noteUpdates a submission note by ID.
ws-form/submission-notesList submission notesReturns notes for a submission by ID.
ws-form/submissionsList submissionsReturns a list of submissions for a form by ID. Supports optional date range, status, keyword search, pagination, and ordering.
ws-form/tab-addAdd tabAdd a tab (group) to a form. First use the tabs tool if you need existing tab IDs. When a form has multiple tabs, also add tab_next / tab_previous fields with field-add as needed.
ws-form/tab-deleteDelete tabPermanently delete a tab and its sections/fields. Cannot delete the last tab on a form. Use the tabs tool to get tab IDs.
ws-form/tab-updateUpdate tabUpdate a tab label by tab ID. Use the tabs tool to get tab IDs.
ws-form/tabsList tabsReturns all tabs (groups) for a form with id, label, and 1-based index. Use tab IDs with tab-update, tab-delete, and section-add (group_id).