Skip Navigation

[Closed] When am using form hook cred_submit_complete there is an issue with recaptcha

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 1 year, 3 months ago.

Assisted by: Minesh.

Author
Posts
#2642983

I want to use the hook for form complete so i can change the form message accordingly to the current page with js
add_action('cred_submit_complete', 'my_success_action_info',10,3);
function my_success_action_info($url, $post_id, $form_data){
// if a specific form
if ($form_data['id']==49747){
$js_code = "
<script>
// Your JavaScript code here
// For example, you can show an alert
console.log('Form submitted from page with ID:');

// You can also perform other JavaScript actions here
</script>
";

// Echo the JavaScript code
echo $js_code;
}
}

#2643165

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

You should not use JS code inside the Toolset form hook "cred_submit_complete" and that is not the recommended way to do so.

If you can tell me what is your requirement and what you want to achieve with what action and share as much as details and admin access details and problem URL where I can see the form, once I review all your requirement, I will be able to guide you in the right dirction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

The topic ‘[Closed] When am using form hook cred_submit_complete there is an issue with recaptcha’ is closed to new replies.