since ‎23-08-2020
5 hours ago
lostfrogg
Level 3
How do I lock all fields on submitting form?
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
I have a XML PDF form with a number of fields, including a few which auto-populate as per a script (e.g. today's time, today's date). Every time I open the (unsubmitted) form, these fields update as per the system date/time. This is expected.I want all fields to lock when the user presses the submit button at the end of the form. Currently, even after the form is submitted, the PDF keeps updating those fields every time it is opened!

Views

32

Likes

0

Replies

1
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Really keen to get this issue finalised if anyone can help. Willing to share my form if that's of any assistance!

Views

20

Likes

0

Replies

0
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
@Kosta_Prokopiu1 - wondering if you've had any further thoughts on this?

Views

56

Likes

0

Replies

0
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Any updates here?

Views

468

Likes

0

Replies

0
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Ah, I see. Is it as simple as turning off the read only function?

Views

517

Likes

0

Replies

0
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Just added you to the shared list - should be OK for you now.

Views

529

Likes

0

Replies

5
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Just sent you a PM with a copy of my form - many thanks. 

Views

532

Likes

0

Replies

6
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Not sure what you mean by logic that blocks those fields from the start. On the time field I have this script:form1.Page1subform.Datenamegradesubform.DateTimeField1::initialize - (FormCalc, client)if ($ == null) then$.rawValue = Num2Time(Time(), "HH:MM")endifIn Designer I just save as a PDF. If I go to "save as", it seems to be saving as an "Adobe Dynamix XML Form (*.pdf)".

Views

544

Likes

0

Replies

8
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Open the non-RE PDF in which program? Adobe Acrobat? If I open it in Acrobat, then the pre-filled fields are not editable - I cannot select the text inside them to delete.

Views

556

Likes

0

Replies

10
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
You mean empty them in Adobe Acrobat? When I try and edit the form in Acrobat, it says "This form cannot be edited in Adobe Acrobat DC. Please use Adobe LiveCycle Designer to edit this form."

Views

428

Likes

0

Replies

12
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
...anyone? 🙂

Views

442

Likes

0

Replies

14
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Any further tips here Kosta?

Views

492

Likes

0

Replies

15
I changed the script type from layout:ready to initialise...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
I changed the script type from layout:ready to initialise, for both the current date and current time fields (which have scripts to auto-populate). When I then save the form and open it in Acrobat, these 2 fields are empty. I save the form as reader enabled, then open it in Acrobat Reader. The fields are still empty. I complete the form and click submit - the form is attached to an email, as we planned. If I open that form however, those 2 fields are still empty! Now they don't seem to auto-popu...

Views

518

Like

1

Replies

0
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Catch 22 situation 😄 Can we set the script to only lock those fields when the submit button is pressed?

Views

529

Like

1

Replies

18
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
After saving the form in Designer, I can open it in either Adobe Acrobat or Adobe Acrobat Reader with no problem - the time field is refreshed each time I open it (as planned). If I open it with Adobe Acrobat and then save as a "reader extended pdf" with "enable more tools", then when I open the form again (either in Adobe Acrobat or Adobe Acrobat Reader) the time field is not updated - it is locked at the time when I saved as a reader extended pdf.When I open the file in Acrobat to save it as a...

Views

548

Like

1

Replies

20
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Hi Kosta,One thing I've noticed - when I save the form in Adobe Abrobat DC as a "Reader Extended PDF / enable more tools (includes form fill-in & save), then the current date & current time fields lock at that point - not when the form is filled in & the submit button pressed. Am I doing something wrong here? I wanted to save it as a Reader Extended PDF so that users can fill the form in. Thanks!

Views

440

Likes

0

Replies

22
Betreff: (deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
That seemed to do it! I now have a useable form and should be able to make the final tweaks myself. Thanks so much for your input! Do you have somewhere I can contribute to you or a charity?

Views

464

Likes

0

Replies

0
(deleted)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
(deleted)

Views

502

Likes

0

Replies

25
Betreff: Hi Kosta, One final query, if you would be so kind. The "...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Thanks, will try that!

Views

506

Likes

0

Replies

26
Betreff: Hi Kosta, One final query, if you would be so kind. The "...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
So have just this in the script box? -form1.Page1subform.Datenamegradesubform.DateField1::ready:layout - (FormCalc, client)if ($ == null) then$.rawValue = Num2Date(date(),"YYYY-MM-DD")endif

Views

521

Likes

0

Replies

28
Betreff: Hi Kosta, One final query, if you would be so kind. The "...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Ah, is that the problem. Should I move this script:if ($ == null) then$.rawValue = Num2Date(date(),"YYYY-MM-DD")endifTo the top of the script box?

Views

535

Likes

0

Replies

30
Re: Hi Kosta, One final query, if you would be so kind. The "...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Could anyone help with this?

Views

470

Likes

0

Replies

0
Hi Kosta, One final query, if you would be so kind. The "...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Hi Kosta,One final query, if you would be so kind. The "current date" field is still not locking - I checked this morning and when I opened the form in Acrobat Reader, it updated the "current date" field to today's date.This is what I have in the "current date" field when I go to "events with scripts":form1.Page1subform.Datenamegradesubform.DateField1::initialize - (FormCalc, client)$=Num2Date(date(),"YYYY-MM-DD")form1.Page1subform.Datenamegradesubform.DateField1::ready:layout - (FormCalc, clien...

Views

496

Like

1

Replies

33
Betreff: Thanks again Kosta - but with that code (I changed the "s...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Yes, that did it! Thank you. Now I just need to wait until tomorrow to check that the "current date" field locks on form submission, and I'll be finished!

Views

511

Like

1

Replies

34
Betreff: Thanks again Kosta - but with that code (I changed the "s...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
@Kosta_Prokopiu1 here is the code - it's basically the one you have just given me, but with the long paths for the field names:var sMailUrl=this.resolveNode("#event").submit.target;sMailUrl = sMailUrl.substr(0,sMailUrl.indexOf("?subject=x")) + "?subject=Liaison psychiatry referral\: " + + form1.Page1subform.PatientSubform.Forename.rawValue.substr(0,1).toUpperCase() + form1.Page1subform.PatientSubform.Surname.rawValue.substr(0,1).toUpperCase();//contains the mailto: with the e-mail addressthis.re...

Views

527

Like

1

Replies

36
(Deleted as duplicate)
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
(Deleted as duplicate)

Views

542

Like

1

Replies

0
Thanks again Kosta - but with that code (I changed the "s...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Thanks again Kosta - but with that code (I changed the "some text"), if the Forename is wqdwqd and the surname is qwd, I get the following in the email subject line: I would expect to get the intials WQ, not NaNQ!Any idea what's going wrong?

Views

547

Like

1

Replies

38
Thanks Kosta, I do appreciate all your input! You mention...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Thanks Kosta, I do appreciate all your input!You mention to change that line - but that line doesn't appear in the script you gave me:var sMailUrl=this.resolveNode("#event").submit.target;sMailUrl = sMailUrl.substr(0,sMailUrl.indexOf("?subject=x")) + "?subject=Some Text\: " + Forname.rawValue + " " + Surename.rawValue + " (" + Forname.rawValue.substr(0,1) + Surename.rawValue.substr(0,1) + ")";//contains the mailto: with the e-mail addressthis.resolveNode("#event").submit.target=sMailUrl;

Views

521

Likes

0

Replies

41
Betreff: Hi Kosta, I have the following script in the "presubmit"...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Hi Kosta, not sure if you received my last message about having just the initials in capitals?

Views

559

Likes

0

Replies

43
Betreff: Hi Kosta, I have the following script in the "presubmit"...
Avatar

lostfrogg

lostfrogg
- Adobe LiveCycle
Hi Kosta,Yes that seemed to fix the issue! Thank you. One thing - with your script, I get this in the email subject header:Some Text: sdf sdf (ss)But what I am trying to get is:Some Text: SSI've been trying to delete the sdf bits but have been struggling to get it to work. Also not sure how to make the initials appear in capitals?

Views

594

Likes

0

Replies

0
Likes given to
Likes from