Not signed in (Sign In)

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

    • CommentAuthorlifestyle
    • CommentTimeNov 16th 2009
     
    I am embedding a form in some i-framed sites and notice that when an incomplete form is submitted, a slick little javascript error box pops up to tell the user how many problems were found with their submission. This is great BUT can I change the dialogue that references the calling site?

    Right now, it says "The page at http://www.myserver.ca says:" I would like to either remove that line or modify it with a variable or otherwise customize it?

    Is this possible and if so, where do I look for the source?

    Thanks.
    • CommentAuthordbuschho
    • CommentTimeNov 16th 2009
     
    Hello,

    I'm guessing you're using Firefox. That text is part of the base code of the browser, and is, in part, a security feature so that you know where a prompt is coming from. This protects you from iframe tricks.

    In any case, if you'd like to change that text, you'll need to ask on the Firefox forums where they will tell you that is can be changed, but not easily, and not on a website by website basis. *shrug* Though I could be wrong.

    Happy to help,
    FA Support.
    • CommentAuthorlifestyle
    • CommentTimeNov 16th 2009
     
    Ok... how do I turn off the generation of the dialogue box altogether then? I will stick with the red highlights on the form...
    • CommentAuthordbuschho
    • CommentTimeNov 16th 2009
     
    The following code should do it.

    <script type="text/javascript">
    wFORMS.behaviors.validation.onFail = function(bInstance) {
    var m = wFORMS.behaviors.validation.messages.notification;
    var firstErrorId = null;
    var c = 0;
    for (var id in bInstance.elementsInError) {
    c++;
    if(!firstErrorId)
    firstErrorId = id;
    }
    m = m.replace('%%', c);

    var elem = document.getElementById(firstErrorId);
    if(elem.scrollIntoView) {
    elem.scrollIntoView();
    } else {
    location.hash="#"+firstErrorId;
    }
    }
    </script>
    • CommentAuthorlifestyle
    • CommentTimeNov 16th 2009
     
    Sorry to be dumb, but am I adding this to one of the javascript files or doing a find/replace? Where do I put it?
    • CommentAuthordbuschho
    • CommentTimeNov 16th 2009
     
    Hello,

    No problem, just place this into your custom code block of your form. In the formbuilder interface you can access this under 'advanced' after clicking the root element ('title') for the form.