Sauter la navigation

Letting Forms Edit Post and User Fields Created by Other Plugins dans WordPress

Learn how to let the Toolset Forms plugin edit custom fields created by other plugins.

Toolset forms can include Post and User fields that are defined by other plugins and the theme.

To control Custom Fields, go to Toolset → Post Forms and click on Manage non-Toolset Post Fields, in the section just below the list of your forms.

In the following example, we will describe the procedure for Post Fields. In case you want to control User Fields, you can navigate to Toolset → User Forms, click on Manage non-Toolset User Fields and follow the same process.

Managing non-Toolset Post Fields with Toolset Forms
Managing non-Toolset Post Fields with Toolset Forms

Select the post type for which you want to display custom fields.

For a post type to be selectable here, it needs to be configured as public, publicly queryable and visible in the GUI.

You can choose to display hidden custom fields (which are normally not showing in the WordPress admin). Then, click Apply. Forms will display all custom fields that are being used by the post type. Click Add to include them in Forms forms.

Dialog for controlling a non-Toolset custom field
Dialog for controlling a non-Toolset custom field

You will select the kind of input to use for each of the fields and enter the appropriate arguments. Fields may have some of the following options, depending on the field type:

  • Required – if not entered, the form cannot be submitted
  • Validate format – Forms will ensure that field input is compatible with the field type (only applicable to some field types)
  • Include this field in Scaffold – the field will automatically appear when you use the Auto-Generate Form feature.

Once you’ve added custom fields to Forms, you will be able to insert them into forms. Forms will save the field values to the database when submitting the forms and load them from the database when editing content. You can remove the fields from Forms management by using the Remove button.

Limitations on controlling third-party custom fields

You cannot use Toolset Types, Forms, or Views to control complex third-party fields like serialized arrays, for example. Doing so will result in an unexpected and broken output. If you need to use such complex fields and control them with Toolset, create them using Toolset Types plugin instead.

Updated
novembre 16, 2020