0
votes

I'm adding a form to a Drupal website. I've created a new page, and created a webform, the webform has been assigned to the page content as a block.

The problem I'm having is when submitting the form, instead of showing the errors of the form at the top of the page like the rest of the forms do, the form action is set to the individual web form page, and any styling/content blocks disappear.

Essentially what I need to do is ensure the form posts to the same page, if I edit the form action in dev tools, the errors show fine at the top of the page.

EDIT: Should also add - I've setup the page and wbeform as per all the others, and they all function as they should and post to the same URL as the page.

Any help appreciated.

Thanks

1
you could try the webform ajax module for the block. drupal.org/project/webform_ajax2pha

1 Answers

0
votes

If you are using the Webform module then you can go to the configuration page of the block in the 'Blocks' section, and look for the following checkbox:

Show all webform pages in block

The description under the checkbox tells you that anything that has to do with the webform (includes errors) will be shown on the current page, instead of redirecting you to the original webform page:

By default multi-page webforms redirect to the node page for all pages after the first one. If checked, all pages will be shown in the block instead.