cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Autocomplete on added row in nested repeating section

Hi,

I followed Autocomplete in a repeating section  and that works just fine 
On opening the form it also works on nested repeating sections.
(A repeating section in a repeating section also gets the autocomplete set)

However it does not work when a row is added.
I add this in the rowadded :

var field_control_id = repeaterRow.find('.' + fieldClassName).attr("id");
NWF$("#" + field_control_id).autocomplete({ source: elements });

This works for the main repeating section

However it does not work for a nested repeating section !
The field_control_id is found and the autocomplete is executed, however in the form there is no autocomplete functionality !

All feedback and help greatly appreciated

Thanks

Danny

0 Kudos
Reply
3 Replies
Workflow Hero

Re: Autocomplete on added row in nested repeating section

have never tested it, but basically your selector should search first for an inner repeating section control within current row being added to outer repeating section, and just then for a specific control within inner repeating section.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Autocomplete on added row in nested repeating section

Thanks for your reply

However, it addresses the case of 'setting the inner repeating section's field autocomplete when adding an outer repeating section row' 

My question was, admittedly not very clear, 'setting an inner repeating section's field autocomplete when adding an row of that same inner repeating section'. 
In that case I receive the repeaterrow from the rowadded event : 

            repeaterRow = NWF$(arguments[0][0]);
So, one would assume that this :
var field_control_id = repeaterRow.find('.' + fieldClassName).attr("id");
NWF$("#" + field_control_id).autocomplete({ source: elements });
works. But it doesn't.

And just to be clear : above works fine when in the case of : setting an outer repeating section's field autocomplete when adding an row of that same outer repeating section'. 

Thanks again 
Accept as Solution Reply
Workflow Hero

Re: Autocomplete on added row in nested repeating section

I included a recent jquery and jquery-ui and worked with that : it works

Don't know if there will be side-effects though ....

Accept as Solution Reply