once you make it working for one repeating section row, it should be possible to do it for all the rows.
any details how did you set it up for first row?
if there are some direct manipulations on DOM elemets you might need to reapply them for every new row being added.
have a look on NWF.FormFiller.Events.RegisterRepeaterRowAdded event which might be the best place to do that
Hello Marian Hatala,
I used SPServices from Codeplex and the tutorial from this site:
Using SPServices to provide data to autocomplete field on Nintex | Drift Bottle
That I found here in the community. Basically, you add 2 js files to Styles library and then point to them from Custom JavaScript Includes in the Form's Advanced Settings.
based on the link you provided, something like this should do the trick
(note I haven't tested it)
NWF.FormFiller.Events.RegisterRepeaterRowAdded(function (){
var repeaterRow = NWF$(argumentsp0]p0]);
repeaterRow.find('.AutocompleteControlClass').autocomplete({source: externalParties});
});
ie. for every new row added you have to attach/configure autocomplete handler to respective control.
to address the control you have to add a class to the control (AutocompleteControlClass) since javascript variable addresses just first RS row.
note2: different types of controls might need a bit more specific selector. simple class selector should work for single line text control.
Hi Marian Hatala,
we've tried this and it works for the change of color in each new row in repeating section but Autocomplete function works only for the first row and we don't know why and Nintex Support cann't help. Do you have any idea what should help us.
function refreshAutocomplete() {
NWF$(".testcontrol").each(function(i, el) {
el = NWF$(el);
el.css("border","1px solid red");
el.autocomplete({
source: externalParties
});
});
}
refreshAutocomplete();
NWF.FormFiller.Events.RegisterRepeaterRowAdded (function () {
window.setTimeout(refreshAutocomplete, 1000);
Hi Dimiter Sotirov and Ivan Krška,
so I've got time to look closer on this and following worked for me (tested just with single line text)
NWF.FormFiller.Events.RegisterRepeaterRowAdded(function (){
var repeaterRow = NWF$(argumentsn0]a0]);
repeaterRow.find('.AutocompleteControlClass input.nf-associated-control').autocomplete({source: externalParties});
});
I'll give it a shot, but looks alright to me. Thank you!
I've just been helping somebody with this today, and thought I would offer my two penneth.
You actually need to apply the autocomplete separately to the first item in the repeating section, and then individually to each new item in the repeating section - otherwise you end up applying it to the hidden first item (used as a template for new items), which injects the CSS classes for autocomplete into the template - which then means you can't apply it to further items as you add them.
For the first item, run the following:
NWF$(".my_field:eq(1)").autocomplete({source:titles});
Then for subsequent items, do the following:
NWF.FormFiller.Events.RegisterRepeaterRowAdded(function (){
var field_control_id = NWF$(argumentsr0]]0]).find('.my_field').attr("id");
NWF$("#" + field_control_id).autocomplete({source: titles});
});
Worth noting that in the above example, ".my_field" is the "Control CSS Class".
I wrote it up in much more depth here...
Setting up jQueryUI Autocomplete in Nintex Forms
Hello Dimiter Sotirov,
were you able to resolve your issue?
if so, could you mark a post that helped you as a correct answer?
Hi Marian ,
if we apply this method means it is working for the clones perfectly but not working for the orginal field...
Do you know if somethign similar would work in SharePoint 2010?