How to dynamically add the the input text field in widget?
How about jQuery append method? To make a counter, simply increment i variable every click. $(‘body’).on(‘click’, ‘.add-more-button’, function() { var i = 2; $(‘.widget-input’).append(‘<label>Link’ + i + ‘</label><input>’); i++; } This is just an idea, I guess someone more experienced can develop it further.