Skip Navigation

[Resolved] Use value of custom field from a form submission as post title?

This support ticket is created 2 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by John Appleseed 2 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#2361781

Tell us what you are trying to do?
I have a custom post type with a front end form for creating instances of that post type. When I submit the form, the post title is an autogenerated unique id. Instead, I'd like to use one of the custom fields ('name', for example) as the post title.

Is there any documentation that you are following?
https://toolset.com/course-chapter/forms-for-front-end-submission-and-editing-of-directory-items/

My thought was that I could:
- add a Post Title field to the form
- use CSS to make the Post Title field invisible
- use the custom field slug like [name] or $(name) in the Post Title 'Field Default Value'. But that doesn't seem to work.

Can you please refer me to a thread on how to do this? Thanks!

#2361889

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jordan,

Thank you for getting in touch.

To set the post title with a custom field value I recommend having a look at the link below and let me know if it helps.
https://toolset.com/forums/topic/post-link-from-custom-fields/#post-578003

It uses our toolset forms hook to set the value of the custom field as the post title.

Please let me know if this helps.
Thanks,
Shane

#2362833

Ah that works great, and it's easy to see how to extend it to other fields. Thanks so much!