Skip Navigation

[Résolu] The user should be able to edit his post form

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

How to create a form to edit this page by the designer? where to insert this link visible only to them?

Solution:

It need a post view, for example:

https://toolset.com/forums/topic/the-user-should-be-able-to-edit-his-post-form/#post-1289277

Relevant Documentation:

https://toolset.com/documentation/user-guides/filtering-views-query-by-author/

This support ticket is created Il y a 5 années et 4 mois. There's a good chance that you are reading advice that it now obsolete.

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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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/Hong_Kong (GMT+08:00)

Ce sujet contient 7 réponses, a 2 voix.

Dernière mise à jour par indianplayschools Il y a 5 années et 4 mois.

Assisté par: Luo Yang.

Auteur
Publications
#1289185
wordpress-profile-custom-post-type-805x464.png

I am trying to connect a user who has filled a form available to him and he should be able to edit the form from time to time.

I am following this documentation
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/
This is exactly what I am trying to do.
My website is designsangam.com where I am trying to build a community for designers, users, and manufacturers.
Please see this demo page
lien caché
1) I have created a user form from where users can register to site
lien caché
2) Now users can login.
lien caché
3) I have created a custom post and custom fields for Designers. Also, a content template to display.
3) After this, I have created a designers registration page(using post forms) which is visible only to logged in users.
lien caché
4) Now users can log-in and see this page.
5) After they fill up this form, I am unable to understand how the relationship of a post author is being created in example documentation. How to create a form to edit this page by the designer? where to insert this link visible only to them?

I am attaching the image from your documentation which shows where I am struck.

#1289277

Hello,

I assume there is a custom post type in your website:
- "for Designers"

Each "for Designers" post's author is different WordPress user.

Please these:
1) Create a Toolset form for editing "for Designers" post

2) Put above form into a content template
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/

3) In the user profile page, create a post view:
- Query posts of your custom post type(for Designers),
- Filter by post's author is current user
- in view's loop, display the edit form link by follow our document:
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/

#1289357

Thank you for the reply
Yes, I have created a post type called Designers. The WordPress user is the same as the post author for the designer. I mean the user registers to the website and then he registers as a designer. So, he should be able to edit his profile as well as edit designer post details (his own only). He can also create only one designer post. He can further create a post as Manufacturer but only one custom post under a category.
So, what should I do after I create a form to edit the designer? I have actually cloned the designer post form and edited the form type to edit form content

#1289363

If you are going to let your WordPress users to edit their own "designer" post, you will need to create another Toolset post form for editing "designer" post, and follow our document to display the edit form link.

One form can handle one post, edit form is for editing post, it is different from creating post.

See my answer above:
https://toolset.com/forums/topic/the-user-should-be-able-to-edit-his-post-form/#post-1289277

#1289391

Sorry for being such a slow learner.
Now I did this. I created a post form by cloning. I edited this form and changed the form type to edit form content.
After saving this form, I created a new content template. In this, I inserted the editing form created above. Now, where can get the filter option. Should I be creating a view?

#1289395

As I mentioned above:
https://toolset.com/forums/topic/the-user-should-be-able-to-edit-his-post-form/#post-1289277

Step 3) In the user profile page, create a post view:
- Query posts of your custom post type(for Designers),
- Filter by post's author is current user
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/
- in view's loop, display the edit form link by follow our document
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/

If you need more assistance for it, please provide a test site with the same problem, also point out the problem page URL, view URL, and form URL, I can try to setup a demo for you. thanks

#1289419
edit-form.JPG

Thanks for the details, I can log into your website.

The "user profile page" is a normal WordPress page, you can created it by yourself.

I have done below modifications in your website:
1) Edit the content template "For editing designers", put the edit form shortcode:
[cred_form form='edit-designers-profile']

2) Create post view "my designers profile" as I mentioned above step3)
lien caché

3) Create a wordpress page "Designers profile page", display above post view:
lien caché
[wpv-view name="my-designers-profile"]

Test it in front-end:
lien caché

I see the link: Edit mad about designs, click it, it display the edit post form correctly
lien caché

see screenshot: edit-form.JPG

#1290305

My issue is resolved now. Thank you!