I have an add row button that works correctly using addinstance, but I would like to have the add row button at the end of each row so a user could insert a row into the middle of existing/fiilled out rows. Is this possible? I would like to be able to do this using Formcalc as that is what all of my scripting in the form currently is.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Yes, it is possible, but in effect what the script does is add a new row at the end of the table AND then move the row up to the approrpiate position.
See the examples here: http://assure.ly/gk8Q7a. Table 5 is a Table object, whereas Table 6 is built using subforms. In both cases the Index number is a button, that adds a row below the existing one clicked.
See does that help,
Niall
Views
Replies
Total Likes
Hi,
Yes, it is possible, but in effect what the script does is add a new row at the end of the table AND then move the row up to the approrpiate position.
See the examples here: http://assure.ly/gk8Q7a. Table 5 is a Table object, whereas Table 6 is built using subforms. In both cases the Index number is a button, that adds a row below the existing one clicked.
See does that help,
Niall
Views
Replies
Total Likes
As always you are Awesome Niall!
I actually did figure it out right before the response, I found the
insertinstance option in formcalc to use rather than addinstance.
Thank You
I've always wondered about doing it this way - why add it and then move it when you could just use _rowName.insertInstance(this.parent.index + 1)?
Hi Jono,
Yes, you are right, insertInstance works and is much cleaner script. I suspose it's just the way I've done it before. I could say "that there's more than one way to skin a cat", but I would have the RSPCA after me. Oops, I just did ;-)
Niall
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies