Skip Navigation

[Resolved] Setting Post Title using Fields from form

This support ticket is created 2 years, 10 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/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 2 years, 10 months ago.

Assisted by: Waqar.

Author
Posts
#2320925

Tell us what you are trying to do?

I'm trying to set up a post type for people where the first name and the last name are separate fields (for sorting purposes).
I would like the title of the post to be [first-name] [last-name] - without making the user have to type in the firstname and lastname twice.

How do I write the post title this way, without user entry?

Is there any documentation that you are following?

Nope - I have not found anything helpful.

Is there a similar example that we can see?

This is what I want it to look like: hidden link (manually entered first name/last name in post title field)

What is the link to your site?

hidden link

#2322507
first-and-last-name-title.png

Hi,

Thank you for contacting us and I'd be happy to assist.

In the default value field for the post title in the form, you can use the "wpv-user" shortcode, to populate the first and last name of the current user.
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-user )


[wpv-user field="user_firstname"] [wpv-user field="user_lastname"]

( example screenshot attached )

As a result, when the form will load, the current user's first and last name will be automatically filled in the post title field.

Note: You can hide the post title field using custom CSS code so that the users can't make any changes to this field.

regards,
Waqar