I'm attempting to dynamically add items to a repeating section of a workflow form using the method found here. Everything works as expected except that when I emulate clicking the "Add New Row" link, the form doesn't dynamically resize as it does when the form is actually clicked. What I end up with is:
My code is as follows:
function completeFormLoad() { var enumerator = listItems.getEnumerator(); while(enumerator.moveNext()) { var item = enumerator.get_current(); var identifier = item.get_item('Title'); var version = item.get_item('Current_x0020_Version'); var id = item.get_item('ID'); NWF$('.identifier:last').val(identifier); NWF$('.version:last').val(version); NWF$('.id:last').val(id); NWF$('.ci-items').find('a').click(); }; }
Can anyone tell me what I'm doing wrong or what else needs to be done to get the form to size correctly?