Expand my Community achievements bar.

Trouble w/ Cancel "Submit by email" action

Avatar

Level 2

Hey everyone,

I'm having trouble with something that I would think would be simple. (But, lately with my experience dealing with Livecycle, few things are. )

Anyways, what I'm trying to do is make at least 4 checkboxes in a section of my PDF required before the PDF can be submitted by email. I have been able to make an alert pop up if less than 4 boxes are selected, but the email with the PDF still shows up regardless of what I do. I have tried the "cancelAction()" and "cancel" functions with no luck. I know there is a way to make this happen, I'm just missing something simple, I'm sure.

I've included a blank template I made with the basic functionality and code all in place. If someone has encountered this, please let me know. I'm anxious to see what I was missing.

(Also, if there is a code to remove the "Save" and "Save as..." options from the menus, that would be idea. I haven't done a lot of research into that yet. But, I know it can be done and I would like to figure it out.)

Thanks for the assistance!

1 Reply

Avatar

Former Community Member

The submit button does not allow you to enter code on it. So I added a second button (type regular) so that we can code on it. I woudl make this button visible to the user and make it look like the emal submit. Then I woudl execute your code on the click event of this button. I would add an else section to the statement and if it gets there that means more than 4 checkboxes are set. Then I woudl programmativcally press the real submit email button. Oh and I woudl make the real submit email button invisible (on the object palette - presence property) so that the user cannot see the real button. I modified your sample to show you. Note that in changing it the Reader rights have been removed. You will have to add them back if this is acceptable.

Paul