Verify Data Submitted To Database

M

mcampbell

I have a form that submits data to a database. For control purposes, I have
disabled the Submit and Print functions from the Toolbar. To compensate for
this, I created a button control that submits and prints the form. It will
submit the data to the database and print the form on their local printer.
This "Submit and Print Form" button is disabled until all required fields are
filled out. The "Submit and Print Form" button is working perfectly.
However, I would like to improve it just a little and hope someone can help.
The one feature that I like about the "Submit" button on the Toolbar is the
fact that you can set it to alert you with a popup message that the data was
submitted to the database with "Success" or "Failure". Can someone provide
me the code to add to my "Submit and Print Form" button to perform the same
fuction as the "Submit" button on the Toolbar in regards to checking/verify
data submitted to the database succeeded or failed as well as showing a popup
message that alerts the users if it succeeded or failed?

Thanks!
 
C

Clay Fox

You might be able to change your button to a submit type and then use the
stock submit options.
Or you can create your own message actions inyour custom button.
 
M

mcampbell

If I convert the button to "Submit" and then "Custom Submit using form code"
then click "Edit Form Code", it shows:

function XDocument::OnSubmitRequest(eventObj)
{
// If the submit operation is successful, set
// eventObj.ReturnStatus = true;
// Write your code here
}

What code do I need to write in order for it to submit the data to the
database and to print the form?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top