On one page I have this code, that loads my Webform:

$block = module_invoke('webform', 'block_view', '660');
print render($block['content']);

But when I click on submit button, validation leads me to another page (webform page). How can I stay on current page, where webform is loaded?

1 Answer 1


Go to admin/block and edit your webform block and check "Show all webform pages in block" and all errors display in block not in node.

This should resolved the problem, however you can check more about this problem here: https://www.drupal.org/node/1308806

  • Now I have new error: On submit button, fields border become red, but error messages are shown after page reload, not after form submition.
    – josaric
    Sep 25, 2014 at 8:56
  • @josaric Please add that as a follow up question , we would be glad to help on that. The above answer seems to answer the original question :) Sep 25, 2014 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.