Not signed in (Sign In)

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

  1.  
    Is there a way to disable/remove the validation javascript alert window on forms? I hate them and don't think they are neccesary.
    •  
      CommentAuthorcedsav
    • CommentTimeJun 16th 2009
     
    Assuming you still want the validation code to run, you can disable the alert by overwriting the piece of code that handles the validation error.

    Try adding this code snippet to the custom code section of your form (see http://app.formassembly.com/pages/support/customization)

    <script type="text/javascript">
    wFORMS.behaviors.validation.onFail = function(b) { }
    </script>


    This disables the alert, but also the scroll to the first error. If your form is particularly long, you can preserve the scrolling by using this instead:


    <script type="text/javascript">
    wFORMS.behaviors.validation.onFail = function(b) {
    for (var id in b.elementsInError) {
    var elem = document.getElementById(id);
    if(elem.scrollIntoView) {
    elem.scrollIntoView();
    } else {
    location.hash="#"+id;
    }
    break;
    }
    }
    </script>
  2.  
    Thank you.