Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

form becomes "read only" recipient receives pdf file

Avatar

Level 2

Hi,

This is my situation:

A fills in form for B. A emails form to B but B can still edit.

I'm trying to figure out how to make the form "read only" when I send it to B while keeping the form editable for A.

I tried doing

form1.access = "readOnly";  under preSubmit for the email button, but A can't make any changes after

I have:

if

(EmailSubmitButton1.presence == "hidden") {

this.access

= "protected";

}

under docReady for every field I want to lock but i have a lot....so i was wondering if there's a code where I can lock all fields at once...something like 'form1.access = "readOnly";'

...and that code for some reason doesn't work for a "clear form" button that i created...it works for all other fields...

Hope it's clear..

Thanks!

1 Reply

Avatar

Level 4

One thing you could try (I'm not sure if you have sorted this out), is to set a hidden field to a value of "1" for example when they hit the e-mail button.  Then on a docReady event or something, you could check that hidden field for if it is a "1" meaning it's been submitted and should be read-only.  then in the event you want, just say something like 'subform.access="readOnly";'

Hope that helps or at least points you in a good direction.
Alex

EDIT:  With user control desired, you may need to have a hidden field for each user and prompt them for a passphrase or something, then check that and lock fields accordingly?