Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Best way to go about having two people use the same form?

Avatar

Level 2

Hi guys,

Relativly new to livecycle and I need some help.

I've been asked to make a form that 2 different people will have access too, what I need to do is as followed:

Person 1

Only has access to the first 5 pages and is able to fill out the form

Person 2

Has access to the WHOLE document and can see what PERSON 1 has entered.

Can this be done with two different versions of the document, or will it have to be all as one?

Regards

1 Accepted Solution

Avatar

Correct answer by
Level 7

Well I have done it before by using a button which the second person clicks and this brings up a messagebox which asks for a password. If the password is entered correctly the rest of the form (which is originally set to hidden) will become visible. The code in the click event of the button is something like (in formcalc):

var correctpassword = xfa.host.response("Password:","For office use only","",1)

if (correctpassword == "whateverYouWantYourPasswordToBe") then

    restOfForm.presence = "visible"

    $.presence = "hidden"

else xfa.host.messageBox("You have entered the wrong password","For office use only",1)

endif

View solution in original post

5 Replies

Avatar

Level 7

well if you want the second person to be able to see what the first person has entered it will need to be the same document. You could do it so the first 5 pages are visible and then the rest can become visible only when a password is entered or something like that. That way the first person can fill it out, send it to the second person who knows the password and that will unlock the whole form.

Avatar

Level 2

That actually sounds like a better idea. Do you have any links to a tutorial to show me how to do this?

Avatar

Correct answer by
Level 7

Well I have done it before by using a button which the second person clicks and this brings up a messagebox which asks for a password. If the password is entered correctly the rest of the form (which is originally set to hidden) will become visible. The code in the click event of the button is something like (in formcalc):

var correctpassword = xfa.host.response("Password:","For office use only","",1)

if (correctpassword == "whateverYouWantYourPasswordToBe") then

    restOfForm.presence = "visible"

    $.presence = "hidden"

else xfa.host.messageBox("You have entered the wrong password","For office use only",1)

endif

Avatar

Level 2

I've had to do mine in Java. (Everything I have used so far has been sourced from the internet) Do you have or know if this will work in Java?

Avatar

Level 7

yes it will work in java just the syntax is a little different, but you can have a mix of java and formcalc in your form anyway - just use formcalc for that button.