Creating and using front-end forms for editing content and users involves the following three steps:

  1. Create the form for editing
  2. Create a Content Template for displaying the editing form
  3. Insert link to the Content Template that displays the form

Let’s go over each of these steps one by one. On this page, we use an example of a form for editing content but the workflow is the same for forms that edit users.

1. Create the form for editing

Creating the form for editing is exactly the same as for the forms for adding content (or registering users).

Go to the Toolset -> Post Forms page and click the Add New button at the top. Follow the wizard to create your form.

In the third step, make sure to select that this form will Edit existing content.

Creating a form for editing content
Creating a form for editing content

2. Create a Content Template for displaying the editing form

Go to the Toolset -> Content Templates page and click the Add New button at the top.

In a dialog that appears, give a name to your template. Don’t assign it to any content and click the Create Content Template button.

On the Content Template editing page, click the Toolset Forms button and select your editing form.

Inserting the editing form into the Content Template
Inserting the editing form into the Content Template

The shortcode for your editing form is inserted into the Content Template.

Besides the form itself, you can optionally add any text and other content to this Content Template. For example, you might add some editing guidelines.

In the last step, you need to insert links to the Content Template that will display the form. There are two places you can insert this link into:

  1. Content Templates for displaying single posts
  2. Views that list items, like posts or users

When designing templates for displaying single posts, you might want to display a link to edit the post that is being viewed.

Link to edit a single post that is being viewed
Link to edit a single post that is being viewed

Edit the Content Template for displaying single posts and click the Toolset Forms button.

In the dialog that appears, look under the Forms Editing section and click the Forms edit-post link button.

Inserting the link edit-post link into the layout that displays single posts
Inserting the edit-post link into the Content Template that displays single posts

In the dialog that appears, select the Content Template that displays your editing form.

Selecting the Content Template that displays an editing form
Selecting the Content Template that displays an editing form

That’s it, a shortcode with a link to edit the current post is inserted.

When you have Views that list items, like posts, for example, you might want to allow users with the right permission to edit each of the items in the list.

The following image shows an example of a list of posts with an edit link next to each listed item.

List of custom posts with an editing link for each
List of custom posts with an editing link for each

If you are creating a new View, you can add the editing link using the Loop Wizard.

Using the Loop Wizard to add a post-edit link
Using the Loop Wizard to add a post-edit link

After selecting the post-edit link, click the Edit button next to it.

Editing the options for the selected post-edit link
Editing the options for the selected post-edit link

In the dialog that appears, select the Content Template that displays your editing form.

 

If you are editing an existing View, you can use the Toolset Forms button. In the dialog that appears, look under the Forms Editing section and click the Forms edit-post link button.

In the dialog that appears, select the Content Template that displays your editing form.

Displaying the Toolset form messages

If an editing form is configured to redirect users back to the edited post, the success message needs to be added to the template displaying that post.

Displaying the Toolset form messages

Using Editing forms to “edit your profile”

You can create forms for editing the profile of the user that is currently logged in. These are the so-called “Edit your profile” forms.

Using Editing forms to “edit your profile”

Need help?

Go to the Getting Started support page, leave a comment and we will reply to you.

What’s next?

Building Forms for Editing when Using Layouts