Date field set following:
object > value > Date
Also set:
Object > field > pattern > 04/01/2007
In this case, I wish if user do not select date, date field will be invisible during print. What is the code with a view to this?
Solved! Go to Solution.
Views
Replies
Total Likes
Okay,
Here is your form back to you: https://acrobat.com/#d=FjEBKIMl4SQV*bS9lZBrFQ
This will work better, because as soon as the user clicks the date field, the "Date" will disappear immediatly, they do not need to delete it.
Good luck,
Niall
Views
Replies
Total Likes
Hi,
You would need a small script in the prePrint event and the postPrint event of the date object.
prePrint (JavaScript)
if (this.rawValue === null)
{
this.presence = "invisible";
}
postPrint (JavaScript)
this.presence = "visible";
Hopefully that will work for you,
Niall
Views
Replies
Total Likes
Thanks for reply.
I placed those but during print date filed remained visible, not invisible.
Views
Replies
Total Likes
Hi,
Make sure that the form is saved as a Dynamic XML Form in the save-as dialog:
As I understand your query: if the date field is blank, then you don't want it to print? The date field is only to print if the user has selected a date. Is that correct?
Niall
Yes, I want so.
This file is dynamic XML form (.pdf)
Views
Replies
Total Likes
Does this help? https://acrobat.com/#d=*FgBws-r9fPRDL23Ue3Sow.
Niall
One thing is that I have set following:
object > value > default > date
I seem this does not work for default value.
I want also keep the default value as date.
I hope you have realized.
Views
Replies
Total Likes
Hi,
Check that there isn't any script in one of the date field's events that is setting the date when the form is opened.
Like this in the layout:ready event:
// Current Date in short-style date format
$.rawValue = num2date(date(), DateFmt(1))
Can you share your form? if so, upload it to a file sharing site and then post the published link here.
Niall
Views
Replies
Total Likes
here the file:
http://www.mediafire.com/?lfobc26rxs2w6vf
having seen it I hope will realize what I want.
Views
Replies
Total Likes
Okay,
Here is your form back to you: https://acrobat.com/#d=FjEBKIMl4SQV*bS9lZBrFQ
This will work better, because as soon as the user clicks the date field, the "Date" will disappear immediatly, they do not need to delete it.
Good luck,
Niall
Views
Replies
Total Likes
Nice work.
If I want the date format like 01/01/2001. So, how can I set it.
present format is jan 22, 2011.
Views
Replies
Total Likes
I have found the solution.
Thanks a lot.I am grateful to you.
Views
Replies
Total Likes
Views
Likes
Replies