Expand my Community achievements bar.

Force Submit prior to Save?

Avatar

Level 3

I have a button scripted to submit to email and auto-close the document upon the click* event.

The problem we've ran into is that some people are saving the document and manually attaching it to an email and sending it to us.

This creates a problem in that we need the emails to be searchable based on content in some of the form fields.  The form must be submitted for us to have this capability.

My question is can it be scripted to require the button I'm using to submit to be clicked prior to the document being saved? (i.e. they click on save and receive a popup directing them to "Submit" the form)

This would make our process much smoother.

As always any suggestions or useful input is greatly appreciated.

Thanks.

3 Replies

Avatar

Former Community Member

You could do this via the pre-save event.  Pre-save, force the click event on your submit button and then ideally, protect all of the fields in your form so that they can not be further modified.

Avatar

Level 3

Thanks for the response Lee.

I've already protected the fields with a click event on the submit button.

Can you provide a sample script of how to force a button click on pre-save?

Your help is greatly appreciated.

Avatar

Level 3

app.alert("message you want to display") on preSave event will create a pop-up encouraging users to submit rather than save.  However, users can still use the "Save As" function.

Thanks to pguerett for this information.