I'm trying to set fields that have the awesomplete attribute to have 3 letter type ahead. I can successfully get it to work using $(".typethree input").attr("data-minchars","3"); and assigning the typethree class to the field.
The issue I'm having is trying to get the type ahead function to work on fields that are created in collections or tables. The code below adds the attribute to the fields, but type ahead doesn't seem to work. I think the awesomplete script needs to reevaluate the form for "new" fields with the attribute, but I'm at a loss.
$('.cf-collection-append').on('click', function(){ $('.cf-collection-block ul').each(function () { $(this).find('.typethree input').attr("data-minchars","3"); }); });