I am a novice, not alot of training with javascript.
I need 2 table rows added to a table without having multiple "add row" buttons. I would like to be able to add both rows with one button.
right now the button is set for the most current row:
Table1._Week.addInstance(0);
the row above is Table1._Codes
How do I script this in order to have both rows appear when the Add Row button is selected?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Here is the form back to you: https://acrobat.com/#d=HWL3d8qeEmz6Tyn8agXz5Q
You may want to check the fonts, as I did not have them on my system.
In any case here is what I did:
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
A couple of things without benefit of seeing the form.
Are the repeating rows called:
'Week' / 'Codes'?
OR
'_Week' / '_Codes'?
The underscore '_' is shorthand for instanceManager, which is used to call the addInstance. If I assure that the repeating rows are just 'Week' / 'Codes' then the following javascript in the click event of the button should work:
Table1._Week.addInstance(true);
Table1._Codes.addinstance(true);
This should add a row to each repeating row in one button.
Please note that the parameter for the addInstance is either 0 (false) or 1 (true), which relates to whether the row will be data merged with the form.
Hope that helps,
Niall
hmmm, see you have another thread on this: add multiple rows with add a row button ???
Views
Replies
Total Likes
Also, make sure you have the rows set to repeat because you may think your scripts aren't working when it's really a form field setting that isn't correct.
Views
Replies
Total Likes
Thanks Niall
It is working, but is not working - it works in the sense that it is adding the additonal row but it is in the wrong place. Is there somewhere for me to post to this form.
Views
Replies
Total Likes
Hi,
Yes, if you upload your form onto Acrobat.com and then share the published link/URL here.
Niall
Views
Replies
Total Likes
https://acrobat.com/#d=WLkWyjnHze0dV6-Jqy31cw
The dilemma is that I would all of the both rows to remain together -
when the add row button is clicked the bottom row doesn't remain with the first instance.
Views
Replies
Total Likes
Hi,
Here is the form back to you: https://acrobat.com/#d=HWL3d8qeEmz6Tyn8agXz5Q
You may want to check the fonts, as I did not have them on my system.
In any case here is what I did:
Hope that helps,
Niall
Views
Replies
Total Likes
Thanks Niall!
You are a lifesaver!!
Views
Replies
Total Likes