I've duplicated the original form within functions.shortcodes.php for another form I needed on the page, which is working. However, I need to send back custom, condition based messages instead of the default message within the div class="formSent" and was wondering if you could suggest how this can be done.
I previously duplicated this function for my form. I'm wondering if is there a way to "show" a message (success or error) based on the response in the condition from the PHP file processing the form submission?
Unfortunately, we using jquery script in our theme, I can't provide php code to show a message like you want because we don't provide support for customize code.
I've duplicated the original form within functions.shortcodes.php for
another form I needed on the page, which is working. However, I need to
send back custom, condition based messages instead of the default
message within the div class="formSent" and was wondering if you could suggest how this can be done.
Hi,
It will depending your form class/id. Our script to call the formSent below:
/*Validation*/ $("#contactform").validate({ submitHandler: function(form) { $(form).ajaxSubmit(); $(form).find('.formSent').show(); $(form).find('input[type=text]').val(''); $(form).find('input[type=email]').val(''); $(form).find('textarea').val(''); } });You can see the #contactform is id of this form, so you still need add correct the id to make the message show up after submit.
Best Regards,
Jelly Team
Thank you.
I previously duplicated this function for my form. I'm wondering if is there a way to "show" a message (success or error) based on the response in the condition from the PHP file processing the form submission?
Hi,
Unfortunately, we using jquery script in our theme, I can't provide php code to show a message like you want because we don't provide support for customize code.
Best Regards,
Jelly Team