Sauter la navigation

[Résolu] The custom function stores the data in askii instead of unicode

This support ticket is created Il y a 1 année et 4 mois. There's a good chance that you are reading advice that it now obsolete.

Ce sujet contient 0 réponse, a 1 voix.

Dernière mise à jour par fabriceS Il y a 1 année et 4 mois.

Assisté par: Christopher Amirian.

Auteur
Publications
#2680753

I used a script War gave me, but the result display special character in their ascii form
Here is the script

add_action('cred_save_data', 'custom_save_form_container',10,2);
function custom_save_form_container($post_id, $form_data)
{
// if a specific form
if ($form_data['id']==12345)
{
// if form container ID is set
if (isset($_POST['_cred_cred_prefix_cred_container_id']))
{
// get the title of the container ID
$container_title = get_the_title($_POST['_cred_cred_prefix_cred_container_id']);
// add it to saved post's target custom field
add_post_meta($post_id, 'wpcf-form-submitted-from', $container_title, true);
}
}
}