Required Controls Left Blank But Can Still Submit - InfoPath Dev
in

InfoPath Dev

Required Controls Left Blank But Can Still Submit

Last post 04-24-2006 06:31 PM by Matt Faus. 22 replies.
Page 2 of 2 (23 items) < Previous 1 2
Sort Posts: Previous Next
  • 04-24-2006 07:33 AM In reply to

    Re: Required Controls Left Blank But Can Still Submit

    Hi Deb,

    Check out this thread:http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1123&SearchTerms=error,validation,required,field
    Stephanie Cantwell / Test Manager
    Qdabra® Software / Streamline data gathering to turn process into knowledge

  • 04-24-2006 07:50 AM In reply to

    Re: Required Controls Left Blank But Can Still Submit

    Sorry, the above reply is not what you are looking for. Look at this thread instead.http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=33
    Stephanie Cantwell / Test Manager
    Qdabra® Software / Streamline data gathering to turn process into knowledge

  • 04-24-2006 07:59 AM In reply to

    Re: Required Controls Left Blank But Can Still Submit

    Sheesh. I know nothing about how to program in InfoPath. I'm pulling from many sources here ... can you help with what's wrong with this syntax? I get an error at "ELSE""

    function CTRL19_5::OnClick(eventObj)
    {
    if (XDocument.Errors.Count > 0)
            XDocument.UI.Alert("Required information is missing as indicated by the red asterisk(s).")
         
            return;
    else
    XDocument.Submit()
    Application.ActiveWindow.Close(true);
    }
  • 04-24-2006 09:21 AM In reply to

    Re: Required Controls Left Blank But Can Still Submit

    Try this:

    function CTRL19_5::OnClick(eventObj)
    {
    if (XDocument.Errors.Count > 0)
    {
    XDocument.UI.Alert("Required information is missing as indicated by the red asterisk(s).")
    return;
    }
    XDocument.Submit()
    Application.ActiveWindow.Close(true);
    }
    Stephanie Cantwell / Test Manager
    Qdabra® Software / Streamline data gathering to turn process into knowledge

  • 04-24-2006 10:31 AM In reply to

    Re: Required Controls Left Blank But Can Still Submit

    OH! I was so close! ;-) Finally!

    I know this seemed elementary to the regulars, but for people like me who aren't developers, we really need simple solutions like this. This might be a good solution to put on one of the Websites. Being able to close InfoPath after submission should be a basic function built into the program and not require custom code.

    Thank you, as usual, Stephanie.

    BTW, why would I use the {} rather than ELSE?
  • 04-24-2006 10:39 AM In reply to

    Re: Required Controls Left Blank But Can Still Submit

    You are welcome, Deb. :-)

    The { }'s are required to group the code to execute for the IF condition. The code previously would always return after the if statement was executed.

    Stephanie Cantwell / Test Manager
    Qdabra® Software / Streamline data gathering to turn process into knowledge

  • 04-24-2006 10:54 AM In reply to

    Re: Required Controls Left Blank But Can Still Submit

    I would really like to be more empowered with creating these solutions on my own. For someone who understands programming concepts and XML but has no experience with any language or the multiple parts to making XML work, where would I start to learn how to do this? For example, would general JScript tutorials have taught me about the grouping of the IF condition? Funny, I wouldn't think that was group, per se, but rather a sequence of events. We tested for a condition, displayed a dialog, then sent the user back.

    I guess I'm generally inquiring where I should go to get better at InfoPath. I'm a quick study and can usually backward engineer pretty well.
  • 04-24-2006 06:31 PM In reply to

    Re: Required Controls Left Blank But Can Still Submit

    I would just Google around for a "JavaScript syntax" tutorial and maybe work your way through a couple Hello World programs to get the ball rolling. Other than that, there are several books listed in the Resources section of this website that are recommended by our team.

    Also, you might have a look at using VBScript instead of JScript, it's bent more towards getting the point across instead of getting caught up in syntax errors. VBScript looks lot more like "real sentences" and can sometimes be easier to understand for simple things like the scripts that run behind InfoPath forms.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 2 of 2 (23 items) < Previous 1 2
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.