Skip to main content

In a Nintex Form, how can I allow a user to clear out or reset a repeating section?

I have a form with four repeating sections. As we all know, users can delete all but the last row of a repeating section by clicking the large X on the right-hand side of the repeating section. But the last element needs to be deleted from the control(s). I know my users well enough to know that they will complain about having to delete data two different ways.

I was looking at an article (Update fields before Submitting ) that seemed promising, but it will only clear out the first control. I know I can accomplish this via a workflow (in fact, I have a workflow to remove any blank rows, just in case a user decides to add a bunch of blanks), but I need to be able to accomplish this on the form itself so the users have the immediate feedback and/or can clear all the choices and enter new ones right away.

I'm pretty good with Forms and Workflows, but not so much with JavaScript.

Any ideas?

Thanks in advance!

This is a work-around using Javascript & you can follow the steps (at Nintex Forms for Office 365):

1. Name the "CSS class" of the repeating section (in my case, the CSS class is named "repeaterDocDetails").

2. Embed the JS to delete all existing row (except the row with index 0) & add in the first row:

// clear all rows except the first one
NWF$(".repeaterDocDetails .nf-repeater-row").each(function(index){
if(index!=0){
$(this).remove();
}
});
// re-create the first row
NWF$(".repeaterDocDetails .ms-addnew").click();


Reply