Disable submit button after submission - InfoPath Dev
in

InfoPath Dev

Disable submit button after submission

Last post 07-13-2012 08:12 AM by Hilary Stoupa. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 07-12-2012 01:42 PM

    Disable submit button after submission

    Good day all,

     I have been trying to manage disabling a submit button after the button has been clicked. Within the option options of the button I have enabled a few rules (i.e. set status flag, submit to document library, and close form). Additionally, I set a conditional format to disable the button if the status flag was set.

     The problem is that it doesn't seem to work. After submit the rules go into affect and submit to the sharepoint document library. Then when I try to open the document in sharepoint for review, the button isn't disabled.

     Am I overlooking somthing? Any help is greatly appreciated.

  • 07-12-2012 02:08 PM In reply to

    Re: Disable submit button after submission

    Hi - are you setting the status flag prior to submitting to the document library? After submitting, save the XML from SharePoint and take a look at the field's value in a text editor - is it what you expect? Then you can compare that to your conditional formatting, make sure the values are exactly the same....

    Hilary Stoupa

  • 07-12-2012 02:37 PM In reply to

    Re: Disable submit button after submission

    The order in the rules are as such:

    1. Set flag

    2. submit form

    3. display thank you message

    4. close form

     I'll take a look at the xml as see what values I have. Thanks.

  • 07-12-2012 03:54 PM In reply to

    Re: Disable submit button after submission

    I tried to view the XML in design but all I was able to see is the control I orginally set up with it's default state. I tried to pull an active (submitted) form but yeilded the same results. It may be worth noting, the form is a 2003 template i modified on a 2007 sharepoint list, so I haven't been able to view the form as a web form. I did look at trying to convert to 2007 version where I am told the display as web form would work but I haven't figured that one out yet.

     Does this info help to narrow down my problem? Not sure.

     

  • 07-12-2012 03:57 PM In reply to

    Re: Disable submit button after submission

    Perhaps I wasn't clear. I meant that you should save the submitted XML (in your SharePoint Library) locally and open with a text editor, like Noetpad. I think there is a good change that your flag field's value is not what you think it is, and that is why your conditional formatting is not working.

    Hilary Stoupa

  • 07-12-2012 05:17 PM In reply to

    Re: Disable submit button after submission

    Ok, I saved locally and have the following:

    <my:SubmitStatus my:SubmitStatus="0">0</my:SubmitStatus>

    On submit the rule changes the boolean to "1" and on the form a check is in the box -> then the rest of the rules.

     Is this correct?

  • 07-12-2012 05:34 PM In reply to

    Re: Disable submit button after submission

    This looks really odd to me:

    <my:SubmitStatus my:SubmitStatus="0">0</my:SubmitStatus>

    Do you have a copy/paste error? Or does SubmitStatus actually also have an attribute named "SubmitStatus"?

    At any rate, is the condition on your button to hide / disable it if SubmitStatus = 1?

    It looks like, if your rule on submit was supposed to set that field to 1, that isn't happening, as it is currently 0, right?

    Hilary Stoupa

  • 07-12-2012 05:40 PM In reply to

    Re: Disable submit button after submission

    I think i figured out the problem.

     my data source for SubmitStatus has one level down another Submit status.

    Looking somthing like this:

    My:SubmitStatus

            SubmitStatus

    If I tie the rule to the My:SubmitStatus the disable function works but the Checkbox doesn't show checked. If I include the rule to change both to "1" it works. I have a feeling that is a messy way of doing it, but seems to work.

     Suggestions?

     Thank you.

  • 07-13-2012 08:12 AM In reply to

    Re: Disable submit button after submission

    Well, I'd personally have only one field in my form for "submit status" and I'd be sure that I set only that field, and I'd be sure I was using the same field for my conditional formatting - but if you have it working the way you want now, you may just want to leave it as is. :-)

    Hilary Stoupa

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.