Skip Navigation

[Resolved] Editing custom post type user information via a form

This thread is resolved. Here is a description of the problem and solution.

Problem:

I make a directory site for advocates.

I made a custom post type “Avocats” with all their information and the connection between the custom post type and the user profile is made via the author function. The user have got a “Avocat” role

I want that the advocate after login can change their information of this custom post type via a form.

Solution:

Please try these:

1) In the page "fiche-avocat", display a post view:

- Query “Avocats” posts

- Filter by:

Post author is same as logged-in user

- In view's loop, display the Toolset form shortcode:
[cred_form form='fiche-avocat']

Relevant Documentation:

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

This support ticket is created 3 years, 9 months ago. 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.

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)

This topic contains 2 replies, has 2 voices.

Last updated by ericK-4 3 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1689197

Hi
I make a directory site for advocates.
I made a custom post type “Avocats” with all their information and the connection between the custom post type and the user profile is made via the author function. The user have got a “Avocat” role
I want that the advocate after login can change their information of this custom post type via a form.
I make a login form shortcode with a redirect page url :
[wpv-login-form redirect_url="hidden link" allow_remember="true" remember_default="true"]
to a postform : [cred_form form='fiche-avocat'] with all the fields of the custom post type
but after log-in with a user account toolset tells me that it can’t display the form and says :
“Le type de formulaire et le type de publication ne correspondent pas”
Thanks for you help what I am missing ?

#1689639

Hello,

I assume the form shortcode [cred_form form='fiche-avocat'] is editing "Avocats" post form.

Please try these:
1) In the page "fiche-avocat", display a post view:
- Query “Avocats” posts
- Filter by:
Post author is same as logged-in user
- In view's loop, display the Toolset form shortcode:
[cred_form form='fiche-avocat']

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

#1689707

My issue is resolved now. Thank you!
And great support here ! Toolset makes my day 🙂

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.