webtuto Posted October 16, 2008 Share Posted October 16, 2008 hey i want to give the visitor the ability to write in a TEXT FIELD the number of TEXT FIELDS he wants to generate thanks Link to comment https://forums.phpfreaks.com/topic/128646-many-input-boxes-that-the-user-selects/ Share on other sites More sharing options...
F1Fan Posted October 16, 2008 Share Posted October 16, 2008 JS: function setInputs(num){ var i; var div = ""; for (i=1;i<=num;i++){ div += "<input type='text' name='text[]'>"; } document.getElementById('texts').innerHTML = div; } HTML: <input type="text" onchange="setInputs(this.value);"> <div id="texts"></div> This should get you started. Link to comment https://forums.phpfreaks.com/topic/128646-many-input-boxes-that-the-user-selects/#findComment-666795 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.