Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After submit webform using ajax the form is showing with confirmation message.
i want to hide the form after complete the ajax form submission and want only thank you message.
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz commentedAdding AJAX support is on the roadmap.
There is a WebformDialogTrait.php that I am using to help manage admin UI forms via Ajax within a modal dialog.
Right now, you are going to have to develop this code yourself and I would be happy to review it. Or you will have to wait for someone else to addresses this request and hopefully they will write a patch, recipe, and/or contrib module.
How can I implement AJAX form submission?, might be the best starting point.
Comment #3
gagandeep_katare CreditAttribution: gagandeep_katare commentedjrockowitz , thanks for your help but i don't want to redirect page only want to replace the form with confirmation message after submit the form. and the solution on http://cgit.drupalcode.org/webform/tree/src/WebformDialogTrait.php?h=8.x... is not working as i want.
Comment #4
jrockowitz CreditAttribution: jrockowitz commentedComment #5
jrockowitz CreditAttribution: jrockowitz commented@see #2757491: Allow Webforms to be submitted using AJAX