Navigation überspringen

[Gelöst] Can I submit CRED forms with a function?

This support ticket is created vor 3 Jahre, 3 Monaten. 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.

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 -

Zeitzone des Unterstützers: Asia/Karachi (GMT+05:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von himanshuS vor 3 Jahre, 3 Monaten.

Assistiert von: Waqar.

Author
Artikel
#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: versteckter Link ) or a custom script to simulate a page load and trigger form submission.

regards,
Waqar

#2332077

My issue is resolved now. Thank you!