Sending form based on options selected - InfoPath Dev
in

InfoPath Dev

Sending form based on options selected

Last post 04-08-2006 12:51 AM by Patrick Halstead. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-07-2006 09:47 AM

    Sending form based on options selected

    I am trying to create a form that, once filled in, can be sent to e-mail recipients but I want the form that gets sent to only be a subset of the form filled out. I want to create the “sent” version of the form by allowing the user to choose one of 4 optional messages, then when they click the send button, the only the information sent is that based on their selection. All the other options and text are removed.

    Is it possible to change the form in that way prior to being sent?
  • 04-07-2006 12:30 PM In reply to

    Re: Sending form based on options selected

    Yes it is possible, but all of this has to be done in the code.

    When you click on "send" button,
    1. Remove the nodes(options which are not selected) using "removeChild()" method from the XML(Min occurs for these nodes should not be 1 in the schema).
    2. Now send mail by accessing the EmailAdapter from the code.
    3. And now add the deleted nodes back into the form.

    In this way you will be able to send mail without the other 3 options.
  • 04-08-2006 12:51 AM In reply to

    Re: Sending form based on options selected

    One more possibility (which also requires a little code) ...

    You can define 4 other subset forms and then when they click on which version they want, set some value in a secondary data source. Based on this value, call NewFromSolution to open a subset form of the given type and load the data into the form. Then, add an Open rule (Tools->Form Options->Advanced->Open Rules) that sends the form on open using an e-mail adapter.
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.