Lock today field afer save

Avatar

Avatar
Validate 1
Level 1
pg38905522
Level 1

Like

1 like

Total Posts

17 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
pg38905522
Level 1

Like

1 like

Total Posts

17 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
pg38905522
Level 1

29-04-2015

Hi,

I have a  form with  java script. When the form is open the script fill the today date.

When the document is reopened with the date pre-filled, it dont change.

I put the code in the postsave event, but the date doesnt lock. 

Any Idea ?

if (this.getField ("DateDemand").value =="")

{

this.getField ("DateDemand").defaultValue = util.printd ("mm/dd/yyyy", new Date());

this.getField ("DateDemand").value = this.getField ("Today").defaultValue;

}

Regards

Pierre

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1
Level 1
pg38905522
Level 1

Like

1 like

Total Posts

17 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
pg38905522
Level 1

Like

1 like

Total Posts

17 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
pg38905522
Level 1

20-05-2015

OK,

I apoligize !

I was not loking after the pdf is save.

Everythink OK

Thanks !!

PGAG

Avatar

Avatar
Validate 1
Level 1
pg38905522
Level 1

Like

1 like

Total Posts

17 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
pg38905522
Level 1

Like

1 like

Total Posts

17 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
pg38905522
Level 1

13-05-2015

HI,  i try it but the day is changing.

Anything else ??

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

29-04-2015

Hi,

you syntax is "wrong", because the JavaScript in Designer is different to that you use in Acrobat.

Add, the following In the preSave event of your date field.


if (this.isNull) {


    this.rawValue = util.printd ("mm/dd/yyyy", new Date());


}