Skip Navigation

[Resuelto] using cred_submit_com , same page prompt

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

I am exploring possibilities of displaying 'bootstrap alert' after form submiision on the same page.

Solution:

Action hook "cred_submit_complete"

https://toolset.com/documentation/programmer-reference/cred-api/#cred_submit_complete

Hook that allows doing a custom action after post data is saved to database and before doing any other action, like redirection.

It don't fit for your case, in your case, I suggest you try these:

1) disable option "AJAX submission"

2) option "What to show after submitting the form" choose:

Display a message instead of the form...

Then you will be able to customize the success message manually.

Relevant Documentation:

This support ticket is created hace 6 años, 2 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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/Hong_Kong (GMT+08:00)

Etiquetado: ,

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por Akhil hace 6 años, 2 meses.

Asistido por: Luo Yang.

Autor
Mensajes
#1115756

Hi team.

i am exploring possibilities of displaying ' bootstrap alert ' after form submiision on the same page.

i have this code.

add_action('cred_submit_complete', 'my_success_action',10,2);
function my_success_action($post_id, $form_data)
{
    
    if ($form_data['id']==7343)
    {
        
        echo  '<div class="alert alert-success"> <strong>Success!</strong> </div>' ;
    }
}

i only get this error "There was an error while submitting the form "

pls advice. thanks.

#1116224

Hello,

Action hook "cred_submit_complete"
https://toolset.com/documentation/programmer-reference/cred-api/#cred_submit_complete
Hook that allows doing a custom action after post data is saved to database and before doing any other action, like redirection.

It don't fit for your case, in your case, I suggest you try these:
1) disable option "AJAX submission"
2) option "What to show after submitting the form" choose:
Display a message instead of the form...

Then you will be able to customize the success message manually.

#1116693

My issue is resolved now. Thank you!