Skip Navigation

[Closed] cred_save_data form

This support ticket is created 2 years, 1 month 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 2 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2307123

Hello,

I have a membership site. I wanted to use some data that my users will input in a form. I am using the custom code cred_save_data to get that pieces of information from the form and use some place else in my website. However my form is not triggering to get the taxanomies result (ie. if they select the color taxonomy, I want to send the term selected "blue").

My question is how do I set it in the form to collect the data from taxonomies in the cred_save_data form? Or if that form is the correct one for me to use in this case

add_action('cred_save_data','func_custom_post_title',10,2);
function func_custom_post_title($post_id,$form_data) {
if ($form_data['id']==9999) {
$name = get_post_meta($post_id, 'wpcf-name', true);
$email = get_post_meta($post_id, 'wpcf-email', true);
$title= $name. '-' . $email;
$args = array('ID' => $post_id, 'post_title' => $title);
wp_update_post($args);
}
}

Thanks

#2307181

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I do not get yet what is your actual use-case of using the Toolset form's hook cred_save_data.

Basically, you can replace 9999 with your original form ID. You can see the form ID when you visit Toolset => Post Forms and with every form item there will be associated ID will be displayed.

Now, can you please tell me what is slug of your color taxonomy and what exactly you want to achieve. Do you want to copy the taxonomy term name to post title? If not, what exactly you want that cred_save_data should do?

The topic ‘[Closed] cred_save_data form’ is closed to new replies.