use onsubmit event - InfoPath Dev
in

InfoPath Dev

use onsubmit event

Last post 10-03-2006 12:34 AM by Shiva. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-28-2006 11:49 PM

    use onsubmit event

    I use jscript
    I want to use the onsubmit event to change the value of a field in the form, and the saved form that will be sent by mail and and downloaded by the reciver to have that field modified(that field will dictate what will be seen).

    Can anybody help me?
  • 09-29-2006 01:12 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694
    Hi basescu Welcome to the Forums,

    You need write code onsubmit event,

    XDocument.DOM.selectSingleNode("Xpath of your field").text = “New Value”;

    By using above line you are changing the value of that field.
    You want to send above form by email right, and then you need to write code for email adapter for sending the form with attachments.

    Use "Email" as the keyword in the forum search, you should be able to find code to send email through code. Using that code you can send the form via email.
  • 10-01-2006 12:02 AM In reply to

    Thank you very much, but i think i wasn't specific enough.

    i know to write code for the event.
    i don't know where to write it.
    If i have a button, i right click on it, and then i use the "code button" on the dialog box, and that opens me the editor, with the cursor on the "button name::onClick"
    {
    //write your code here

    }
    but with the onsubmit, i don't know what to write
    XDocument.onsubmit?
    and where to write it?

    thanks
  • 10-03-2006 12:34 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694
    Hi basescu,

    Here are the steps,
    1. Open your form in design mode.
    2. On the Tools menu, click Submitting Forms.
    3. In the Submitting Forms dialog box, click Enable Submit commands and buttons.
    4. In the Submit to box, Select Custom submit using form code option.
    5. Check Edit Form Code checkbox and click on OK button.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.