Navigation überspringen

[Gelöst] Setting Post Title using Fields from form

This support ticket is created vor 4 years, 2 months. 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 -

Zeitzone des Unterstützers: Asia/Karachi (GMT+05:00)

Dieses Thema enthält 1 reply, hat 2 Stimmen.

Zuletzt aktualisiert von Waqar vor 4 years, 2 months.

Assistiert von: Waqar.

Author
Artikel
#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: versteckter Link (manually entered first name/last name in post title field)

What is the link to your site?

versteckter 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