Skip Navigation

[Resolved] How to set post title based on CRED custom fields?

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

Problem:

I have form that collects first name and last name for a post called "OT Profile". I want the post-tile to "FirstName LastName PostID" .... and the slug to "firstname-lastname-postID"

Can you please share the cred hook code that I would use to do this?

Solution:

If it is, it is possible with Form action hook cred_save_post, see our document:

https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

click link "Usage examples", the last example codes:
//Create a dynamic post title by the CRED form.

Relevant Documentation:

https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

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

Assisted by: Luo Yang.

Author
Posts
#1145220

I have form that collects first name and last name for a post called "OT Profile". I want the post-tile to "FirstName LastName PostID" .... and the slug to "firstname-lastname-postID"

Can you please share the cred hook code that I would use to do this?

Thanks in advance.

#1145572

Hello,

I assume we are talking about a Toolset form for edit/create a "OT Profile" post.

If it is, it is possible with Form action hook cred_save_post, see our document:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
click link "Usage examples", the last example codes:
//Create a dynamic post title by the CRED form.

#1146038

My issue is resolved now. Thank you!