Skip Navigation

[Resolved] Create a new user and at the same time create a pre-formatted post

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

Problem:

Use Toolset user form to create a new user, and at the same time create a pre-formatted post

Solution:

There isn't such a built-in feature within Toolset, it needs custom codes, for example, you can try these:

https://toolset.com/forums/topic/create-a-new-user-and-at-the-same-time-create-a-pre-formatted-post/#post-1220592

Relevant Documentation:

https://developer.wordpress.org/reference/functions/wp_insert_post/

This support ticket is created 5 years, 8 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 Mario 5 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1220429

Tell us what you are trying to do?

Create a new user and at the same time create a pre-formatted post

#1220592

Hello,

There isn't such a built-in feature within Toolset, it needs custom codes, for example, you can try these:
1) Create a Toolset user form for creating new users:
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-registering-users/

2) After user submit above form, use action hook cred_save_data to trigger a custom PHP function:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

3) In this custom PHP function, create the new pre-formatted post:
https://developer.wordpress.org/reference/functions/wp_insert_post/

#1222803

My issue is resolved now. Thank you!