Skip Navigation

[Resolved] Autopopulate CRED Submission Title/Slug with Taxonomy and Custom Field

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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 1 reply, has 2 voices.

Last updated by Luo Yang 7 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#467691

I've been trying to do this myself using various bits of info I found on these support forms, and I'm lost. Therefore, I won't even provide my work, rather detail what I need.

I have a CRED form built that my client will use. The URL/Title for each submission needs to be created using a mix of two things:

1) A taxonomy he picks while creating a new submission, and
2) A custom field (which is a date) that he picks in the CRED form as well.

It would be displayed: website.com/taxonomy_name-custom_date

Can anyone help? I'm so lost.

#468113

Dear keith,

It needs custom codes, I suggest you try with CRED action hook cred_save_data to setup your custom PHP function.
https://toolset.com/documentation/user-guides/cred-api/#csd

In your PHP function, use wordpress function wp_update_post to update the post title and slug
https://codex.wordpress.org/Function_Reference/wp_update_post

see similar thread:
https://toolset.com/forums/topic/cred-create-automatic-title-for-new-entries/#post-159812

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.