Announcement

Collapse
No announcement yet.

How do I get the error message to fire off before the sc_redir?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I get the error message to fire off before the sc_redir?

    I have a form with a required field. In my onValidateFailure event I have an sc_redir with the error redirect of "F". My problem is that the error message for the required field is not shown and the redirect happens. With this behavior the end user might think they have submitted the form properly when they didn't. I tried using sc_error_message in the onValidateFailure event before the sc_redir but it is ignored. Please advise.

  • #2
    sc_ajax_message is is exactly what I need. It has the error message and redirect all in one, unfortunately that particular macro is not available on the onValidateFailure event

    Comment


    • #3
      Did you try with echo ?? That pops up a window as well. And it does work (a bit quircky). My guess: you could use it to open a window with an error of sorts.

      Comment


      • #4
        Another idea worth trying.
        Create a PHP-Method to fire up your sc_ajax_message() macro and call this method from the onValidateFailure-event.

        jsb

        Comment

        Working...
        X