Is there a short script to make all the fields in the same table row null (blank)? I want to clear all data when that row is deleted.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
This JavaScript function will reset all the fields within the row passed in;
function clear(row)
{
var resetList = [];
var fields = row.resolveNodes("#field[*]");
for (var i = 0; i < fields.length; i++)
{
resetList.push(fields.item(i).somExpression);
}
xfa.host.resetData(resetList.join(","));
}
So to remove all the data from the second row you could call it using;
clear(xfa.resolveNode("Table1.Row[1]"));
Hope that helps
Bruce
Views
Replies
Total Likes
Hi,
I don't understand the problem, if you delete the row then the fields within that row are deleted as well.
What sort of binding are you using.
Regards
Bruce
Views
Replies
Total Likes
Sorry - what I should have said was I want to hide the bottom row when the user clicks the delete button. This will also remove al the data that the user enetered into that row.
Views
Replies
Total Likes
Hi,
This JavaScript function will reset all the fields within the row passed in;
function clear(row)
{
var resetList = [];
var fields = row.resolveNodes("#field[*]");
for (var i = 0; i < fields.length; i++)
{
resetList.push(fields.item(i).somExpression);
}
xfa.host.resetData(resetList.join(","));
}
So to remove all the data from the second row you could call it using;
clear(xfa.resolveNode("Table1.Row[1]"));
Hope that helps
Bruce
Views
Replies
Total Likes
Thank you
Views
Replies
Total Likes
Views
Likes
Replies