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.
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/
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
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
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?
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
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
My issue is resolved now. Thank you!