Copy link to clipboard
Copied
Hello
I need creat java script :
When I take copy of date
Such as formate : 20241028
And past at feild will be shown
28-10-2024 start from
Add Word (start from)
And add symbol (-) to date
Copy link to clipboard
Copied
Enter the following custom format script:
if(event.value)
{
var date=util.scand("yyyymmdd", event.value);
event.value="start from "+ util.printd("dd-mm-yyyy", date)+ " -";
}
Copy link to clipboard
Copied
My mistake. Did Print. That runs after you print. Will print runs when you trigger print but before it actually prints. So if you want the field values to show up on the print, it's Did Print. Then they will reset after you print.
Copy link to clipboard
Copied
Yes. You have to set it with a script if by "empty" you mean no value. You use a space. It will look empty (the space).
Copy link to clipboard
Copied
Enter the following custom format script:
if(event.value)
{
var date=util.scand("yyyymmdd", event.value);
event.value="start from "+ util.printd("dd-mm-yyyy", date)+ " -";
}
Copy link to clipboard
Copied
It is Working dear
On more thing
Can create script when i print pdf
Feild be reset from any data
Copy link to clipboard
Copied
Before print or after?
Copy link to clipboard
Copied
After prrint dear
Copy link to clipboard
Copied
With the new Acrobat disabled, search "Document" in the tools tab, then select "Document Actions" under "JavaScript", then "Did Print":
Enter the following script:
this.resetForm();
Copy link to clipboard
Copied
Dear
I think should choose
Document will print
Or
Document did print
What is different between them
Regards.
Copy link to clipboard
Copied
My mistake. Did Print. That runs after you print. Will print runs when you trigger print but before it actually prints. So if you want the field values to show up on the print, it's Did Print. Then they will reset after you print.
Copy link to clipboard
Copied
Many thanks dear
Have ance day
Copy link to clipboard
Copied
Dear
I use this script to reset specific field from data when (did print)
I is working okay at all fields except field (dropdown)
Can check where is mistake at below script:
//array of the field names to clearvar aFields = new Array("text1","text2","text3","Dropdown1");
//clear the field in the array of namesthis.resetForm(aFields);
Copy link to clipboard
Copied
What is the default value of the Dropdown1, and is Dropdown1 spelled correctly, including spacing and case sensitivity?
Copy link to clipboard
Copied
Yes dear Dropdown1 spelled correctly
But default value I don't have.
I have only three choices from drop down list
ā
Can I have empty default value at drop down list?
Copy link to clipboard
Copied
Yes. You have to set it with a script if by "empty" you mean no value. You use a space. It will look empty (the space).
Copy link to clipboard
Copied
It is Working
Many thanks
Copy link to clipboard
Copied
This will not work in a PDF form.