Skip Navigation

[Resolved] Can I submit CRED forms with a function?

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

Our next available supporter will start replying to tickets in about 2.29 hours from now. Thank you for your understanding.

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/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by himanshuS 2 years, 7 months ago.

Assisted by: Waqar.

Author
Posts
#2330439

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?

#2330595

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

#2332077

My issue is resolved now. Thank you!