2

Given a ctools modal popup in Drupal 7, and a form being displayed in it, in the mymodule_myform_validate() function, what I want to do is replace the normal drupal_message pink display of form errors at the top of the form with an error message displayed by changing the #prefix of the first field.

What do I call to stop the modal from completing the submit and to get the field's prefix value to appear? I'm not sure whether I need to do this by having the modal execute an ajax command like ajax_before(), or whether I simply need somehow to get the form to rebuild, and what call(s) to make in this context.

mzy
  • 1,754
  • 2
  • 20
  • 36
JAyenGreen
  • 1,385
  • 2
  • 12
  • 23

0 Answers0