I have a custom post type called portfolio where I as an admin run a process called 'Create skill profile' on the edit post form.
This is a manual process and I would like to replicate the behavior on CRED eidt form submisson with a functions.
The main reason I need this is to email the user with the right format specified in the CRED form notiifcation.
The direct wp_mail() function does not work directly with PHP on my end and I want to leverage the setup I already have.
Is there a CRED_form() function I can use with the right variables to trigger submission and all its hooks and notifications?
Hi,
Thank you for contacting us and I'd be happy to assist.
The "cred_form" function can be used to get the form itself in the PHP code ( ref: https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_form ), however, it doesn't submit the form.
There is no built-in function or hook available to programmatically submit the form, so this will require some customization involving either CURL ( ref: hidden link ) or a custom script to simulate a page load and trigger form submission.
regards,
Waqar
My issue is resolved now. Thank you!