Skip Navigation

[Resolved] Front-end Forms for Editing Content

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 6.25 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by richardB-17 2 years ago.

Assisted by: Waqar.

Author
Posts
#2506175
my-account-page.jpg
elementor-page-settings.jpg
edit-page-form.jpg
edit-page.jpg

Tell us what you are trying to do?
I have created three Elementor pages to use as front-end edit forms that can be accessed from my account page, but I am getting the following error Form type and post type do not match. I used the toolset form element on the pages.

Is there any documentation that you are following?
https://toolset.com/course-lesson/front-end-forms-for-editing-content/

Is there a similar example that we can see?

What is the link to your site?
hidden link
hidden link
hidden link
hidden link

#2506549

Hi,

Thank you for contacting us and I'd be happy to assist.

When using a form to edit a post, you need to specify the scope of which post should be edited by it. For example, if the form is placed on the single post page of the same post type that form is set to edit, that post is used for editing.

And if the form is used on some different post type, for example, a page, the ID of the target post to edit can be passed in the form's shortcode, using the "post" attribute:
https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_form

For example, if the form name is "Form name" and the target post's ID is "1234", the shortcode will look like this:


[cred_form form="Form name" post="1234"]

From the screenshots, I'll assume that you allow each student to create a single "Student" post where he/she is the post author.

If that is correct, you can create a new post view, that is set to show the "Student" post type. And in that view's query filter section, you can include the post author filter, so that it shows only the post where the currently logged-in user is the author.

When you'll place this edit form inside the loop of this newly created view, it will use that particular student post for editing.

When this view with the form is ready, you can place this view on the account/profile page and it will work.

I hope this helps and please let me know if you need any further assistance with this.

regards,
Waqar

#2506733

Hi Waqar,

I hope you are well.

Thank you for the feedback.

How can I simply just add an edit button on my account page where the user can click on the button to edit the profile?

#2508009

My issue is resolved now.

I used a view with [cred_form form="edit-full-member-profile"] which worked for me.

Thank you!