note 49060 deleted from faq.html by googleguy

From: Date: Tue, 22 Oct 2013 12:17:16 +0000
Subject: note 49060 deleted from faq.html by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197142@lists.php.net to get a copy of this message
Note Submitter: alberto dot delatorre at gmail dot com ---- Other way to make a form with array fields, and use JavaScript features on them, is use both name and id attributes on the field as: <input type="text" name="myfield[]" id="myfield1"/> <input type="text" name="myfield[]" id="myfield2"/> <script language="JavaScript"> document.getElementById("myfield1"); document.getElementById("myfield2"); </script> This is an easy way to do it. To number the fields, do a simple for structure and you have done.

« previous php.notes (#197142) next »