I have an existing form that I received help here when creating several months ago. The form has a button to add additional follow up rows on click. When the form is saved and closed out of, the rows disappear upon reopening the form. Any idea as to why this happens and how to fix it? I can send the form if it would help.
Views
Replies
Total Likes
Views
Replies
Total Likes
Thanks! See attached. When the "Add New Follow-Up Button" is pressed, new
line items are added. When the form is saved and re-opened, any of the
follow-up lines added disappear.
Views
Replies
Total Likes
In Designer on the File/Form Properties/General tab make sure that the Save Scripting Changes radio button is set to Automatic.
Paul
Views
Replies
Total Likes
I verified your form..
In the initialize event of the Row1 under all three subforms you have placed the code to hide the Row1.
Instance1.Table1.Row1::initialize - (JavaScript, client)
//this.presence="hidden";
You need to modify the code to check if there are more than one row then display the Row1 (OR) what ever condition you want to check to identify that the Followup is clicked before saving the PDF..
With the above code, even though you have added the rows before saving, they are all hidden when you reopen.
For your testing comment all the places where you have the following code and test the PDF.
this.presence="hidden";
Hope this helps.
Thanks
Srini
Views
Replies
Total Likes
Ah thanks! I'm a bit confused by your second paragraph about modifying the
code. The reason I had added the "hidden" line item was so that the
follow-up line item only appears if the "Add Follow-Up" button is clicked.
Is this easy to accomplish or is it advanced coding (I'm not so good at
this!)
Views
Replies
Total Likes
When you are reopening the PDF, the code should check if the Add button was clicked earlier..
The only way you can find that is by getting the count of the rows for Row1.
So if the count of Row1 is more than 1 then you need to display the Row1 other wise hide the Row1.
For Example:
You can place the following code in the Initialize event of the Row1, to check the Row1 under Technical subform.
You need to do the similar thing for other sections as well.
if(Technical.Instance1.Table1.Row1.instanceManager.count>1)
Technical.Instance1.Table1.Row1.presence = "visible";
else
Technical.Instance1.Table1.Row1.presence = "hidden";
Thanks
Srini
Views
Replies
Total Likes
Thank you!
Views
Replies
Total Likes
When I add that code, it adds 2 follow-up statements when you push the
button!
Views
Replies
Total Likes
Sorry for bothering you again, but I've tried a million things to rectify
this. Any ideas on how to add 1 instead of 2?
Views
Replies
Total Likes
Let me work on it and provide you the working code..
Thanks
Srini
Views
Replies
Total Likes
Thank you I appreciate it!
Views
Replies
Total Likes
Hi! Any luck with this?
Views
Replies
Total Likes
Here is the corrected form..
Let me know if you have any issues..
https://acrobat.com/#d=DM6hpBlIB9u6QQgHTgBwlA
Thanks
Srini
Views
Replies
Total Likes
Thanks, I appreciate your help, but now when you add additional follow-up
items to a statement other than the first, it just adds follow-ups under the
first statement
Views
Replies
Total Likes
In my system when I add the folow ups they are getting added to the respective section.. But not sure why you are seeing a different behaviour.
Select the Followup button and under click event, make sure that the path of Row1 is correct. If the path of the Row1 is pointing to First section for all three Followup buttons, please change it to the respective section path.
Thanks
Srini
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies