This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
I've created a form with a number of check boxes. Each box coresponds to a different stage in a project that is checked when completed. What I'd like to do, if possible, is add a date field assinged to each check box that automatically fills in the date the box was checked.
Is this possible and if so, how?
Solved! Go to Solution.
Views
Replies
Total Likes
You have to save the form as a dynamic PDF. See the attached modified sample.
paul
Views
Replies
Total Likes
I have created a small sample for you. Please see the attached. I also hid the date fields until the checkbox is checked.
Paul
Thanks for the help, unfortunately I am still not able to get it to work. Could it be because I'm using an older version of LiveCycle (version 8.0)? I can get your form to run just fine but whe I duplicate the code to my form I get nothing. In fact I copied the fields you provided directly to my form and they would not work there.
Can you tell me what I'm doing wrong?
I've attached my form. Hopefully that will help.
P.S. - I also have need to add a popup on the form when it is first accessed, if you have any idea how to do it that would be great too.
Views
Replies
Total Likes
You have to save the form as a dynamic PDF. See the attached modified sample.
paul
Views
Replies
Total Likes
Thanks again Paul.
Got another question for you.
I check the box and the date now shows up but when I save it and go back the box still shows as checked but the date is no longer visable. Why?
Views
Replies
Total Likes
Because we have initialized the form to hide the field. We woudl need to add code to the initialize event of that field to see if the checkbox is checked and make it visible accordingly.
paul
Views
Replies
Total Likes
Problem, I'm really new at this and my scripting ability is almost nill. I've been exposed to different scripting languages in the past so I can kind of make them out and am ok enough to know when I need to change CheckBox1 to CheckBox2 and so on but I really don't have enough knowledge to write my own scripts.
Could I get you to offer some more help and give me the code necessary to do what I need?
Thanks Paul,
Ken
Views
Replies
Total Likes
On the Initialize event of the DateField you can add this code:
if (CheckBox1.rawValue == 1){
this.presence = "visible";
}
Then you can duplicate the code for each datefield substituting the proper object values for that dateField. Note that this is Javascript
Paul
Beautiful !
Thank you for all the help!
Could I ask one more question? Can I add a pop up to the form? Something with a simple statement that pops up any time the form is opened.
Views
Replies
Total Likes
Do you mean like a message box when the form is opened?
To do that you woudl add the command:
app.alert("This is the message");
to the initialize event of the 1st field.
Paul
Views
Replies
Total Likes
Perfect!
You're awesome, thanks again.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies