Disable when the InfoPath form is attached ***Need urgent help*** - InfoPath Dev
in

InfoPath Dev

Disable when the InfoPath form is attached ***Need urgent help***

Last post 03-06-2008 05:54 AM by aoztuncer. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-05-2008 06:37 AM

    Disable when the InfoPath form is attached ***Need urgent help***

    Hello,

    I use the following function to send emails in my form.

    function sendEmail(to, cc, subject, body, attachment)

    {

    try

    {

    var appItem;

    var mailItem;

    appItem = new ActiveXObject("Outlook.Application");

    mailItem = appItem.CreateItem(0);

    mailItem.Recipients.Add(to);

    mailItem.Subject = subject;

    mailItem.Body = body;

    mailItem.Attachments.Add(attachment,1);

    mailItem.Display();

    }

    catch(ex){ XDocument.UI.Alert(ex.description);

    }

    }

     

    I pass "XDocument.URI" for attachment parameter, which attaches the form to the email. However, when the recipients open their emails, the form is still editable and they think they can change it and hit "Save" to update their forms. I want to disable the form when it is attached to an email so they will know that they cannot change anything on it. Is there a way to do it?

     

    I welcome all your ideas.

     

    Thanks!

  • 03-05-2008 08:03 AM In reply to

    Re: Disable when the InfoPath form is attached ***Need urgent help***

    All you need is a field in your form to track form state.

    In the actions before submit set this field to submitted or whatever is appropriate.

    Then have another view which is a read-only copy.  In 2007 this is very easy, copy one view to another and then mark the second read-only in the view properties. Iin 2003 convert all the fields to expression boxes.

    Create an open rule that checks state and if it is submited switch to the readonly view.

  • 03-06-2008 05:54 AM In reply to

    Re: Disable when the InfoPath form is attached ***Need urgent help***

    Thank you..I'll try this.

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