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.

Form in a read-only format

Avatar

Level 1

I have a customer who would like his team to receive the completed LiveCycle Designer Form in a read-only format.  To clarify:  User A completes the dynamic form fields, uses the Submit by Email button and Team Member B receives the PDF in a public email-box.  My customer does not want the employee (Team Member B) to alter any information on that form once it has been received; he wishes that information to be in a Read-Only format. Anyone have any step by step tips?

Thanks!

REP

P.S. in attach my XML form code

9 Replies

Avatar

Former Community Member

This is possible. You can put a JavaScript function on the submit button

that will loop through all the fields on the form and set them to protected

fields.

Avatar

Level 1

Can you explain the procedure to me....sorry but I'm very very newbie.

thanks

REP

Avatar

Former Community Member

I have added an example of this in the attached PDF...

I have 5 fields on the form. 4 can accept data and 1 is a hidden field (although i have kept it visible for you to see how it behaves). Enter data into the 4 text fields and click on submit. You will see an alert telling you the form is now being locked and an email pops up with the PDF attached and is ready to be sent. If you then save the form and re-open it and you get another popup telling you that the form has been locked.

Basically what happens is when you click submit, the the code loops through all the fields on the form and sets them to protected. Then I populate the hidden field with a 1. The form can now no longer be edited. If the form is re-opened, I check if the hidden field's vale is 1. If so, lock the form immediately to avoid editing.

I'm sure there are more ways to do this, but this is what Ive come up with quick.

1. Check the JavaScript code in the mouseDown event of the submit button

2. There is also some JavaScript code that needs to go on the docReady event of the lockForm field

Avatar

Level 1

I dallas....Thanks for help...!!! And sorry for my english.

So...I have amny questions....why after insert your code I complete all field and

I press the submit button don't open outlook box whit the file.pdf but I look the read only form.

In attach my forum for you.....it's possible to modified for me..???

Thanks....you are a GOD....


Avatar

Level 10

Errors in your code which prevents submitting the form through email.

See the attached imaged with error markings.

You are attempting to refer to an invalid field.

FYI: Only your form data(as XML) will be emailed to.. SO even if you try to lock the form, there will be no use.

You could create another form template (With all fields locked) and merge the form with the submitted data.

Nith

Avatar

Former Community Member

Hi reperibile, you just need to copy that hidden field (_lockField) to your form as well. Then make it a hidden field. the code references the following structure:

form > Page1 > _lockField

You can either match your form structure the code (because your form has an unnamed page 1) , or change the code to match the form structure. either way it will work.

@ $nith$ - we are attaching a pdf to an email, we're not sending xml.

Avatar

Level 10

Just wanted to know, how did submit the PDF (instead of xml) using "Email submit button"?

Nith

Avatar

Former Community Member

I used a regular button. On the 'Submit' Tab enter 'mailto:email@domain.com', then in the URL box select 'PDF' from 'Submit' dropdown.