0

I have a custom form, which is rendered in a custom block in drupal 8. Now the problem is when I place some form validation code on the form in validate function it works well but the error message is shown after page refresh. I think this issue is related to caching. when I render that form using routing the error message shows.the problem is when the form is rendered in block.

  • there is no error message. the error message is my custom message.it only displayed after I refresh the page or move to different page after submitting the form – harsh_behl_0007 Jun 7 '16 at 17:36
  • Try adding a messages element to your block. It is the render element that prints system messages. – Eyal Jun 7 '16 at 21:36
  • Please check this "drupal.org/node/2773333" patch. Hope this will help you . – Pallavi Sugandhi Oct 17 '16 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.