We use the following code to save the project with the title "Project xxx".
In this case, you do not send notifications when you save the "Projects" cred form with the "New Project" menu name
//GUARDA PROYECTO AUTO
add_action('cred_save_data', 'my_custom_save_data_action', 10, 2);
function my_custom_save_data_action( $post_id, $form_data ){
// if a specific formt
if ($form_data['id']==183) {
$title = date('ymdhis');
$title = "Proyecto ".$post_id;
$slug = sanitize_title($title);
wp_update_post(array('ID' => $post_id, 'post_title' => $title, 'post_name' => $title));
}
}
Dear Carmen,
What kind of notifications do you want to send with CRED form?
If it is Email notification, I checked the CRED form "Proyectos" (ID:183) in your website, there isn't any Email notification setting in it, please follow our document to setup the email notifications:
https://toolset.com/documentation/user-guides/automated-email-notifications-with-cred/
Automated Email Notifications With CRED
Hello,
Maybe I eliminated it yesterday by doing tests.
Notification is already activated and it still does not work.
Can you verify it now? Thank you
It is abnormal, you can check these:
1) Remove the custom PHP codes you mentioned above, test the CRED form again, check if it works
If it still does not work, it should not a problem related with your custom PHP codes, it might be a compatibility problem or server problem, please check below
2) deactivate other plugins and switch to wordpress default theme, and test again
3) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, I need to test and debug it in my localhost, thanks
Thanks for the details, I am downloading the file, will feedback if there is anything found
I can import your database dump file in my localhost, here are what I found:
1) Without the custom PHP codes you mentioned above:
https://toolset.com/forums/topic/it-does-not-send-notifications-when-the-title-is-not-cred-auto-draft/#post-610570
After submit the CRED form, it does send the Email, for example:
mail to: Array ( [0] => crea@crearedes.com )
mail subject: CRED Auto Draft 837ec5754f503cfaaee0929fd48974e7
mail body:
CRED Auto Draft 837ec5754f503cfaaee0929fd48974e7
<em><u>hidden link</u></em>
2) Without the custom PHP codes, after submit the CRED form, it does send the Email, for example:
mail to:Array ( [0] => crea@crearedes.com )
mail subject:Proyecto 455
mail body:
Proyecto 455
<em><u>hidden link</u></em>
So it should be a compatibility problem or server problem in your website, since the problem only exists in your website, I will need to debug in your website: deactivate plugins and switch themes, please make a full backup of your website, then update this thread.
Backup made.
Feel free to perform the necessary tests and changes.
The project is in the initial phase and the current content is not endangered.
Thank you.
Here are what I found, I tried these:
1) Edit the CRED form "Proyectos":
in section "E-mail Notifications", enable option "Send notification to a specific email address:", fill my own email address
2) Put the CRED form in a new page:
hidden link
And test it again, I can get the email in my Google email box, but it is marked as "spam" status, see screenshot:
cred-email.JPG
I suggest you check these:
1) Make sure the email address you filled in option "Send notification to a WordPress user" is valid: crea@creare***.com
2) Submit the CRED form, check the email in the spam box.
It seems that the problem is only with my user (fernando), I have tested with other users and it actually works.
Thanks and I close the ticket