|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Laurence Smarty Rookie
Joined: 05 Jan 2006 Posts: 7
|
Posted: Mon Jan 23, 2006 2:58 pm Post subject: [Résolu] Formulaire et cases à cocher |
|
|
Bonjour à tous,
Dans un formulaire,
j'ai des cases à cocher générées automatiquement par {html_checkboxes} :
<label><input type="checkbox" name="stock[]" value="0" />stock1</label>
<label><input type="checkbox" name="stock[]" value="1" />stock2</label>
<label><input type="checkbox" name="stock[]" value="2" />stock3</label>
<label><input type="checkbox" name="stock[]" value="3" />stock4</label>
Je n'ai donc pas la possibilité de changer le "name" de chaque case à cocher.
Je voudrais vérifier avant envoi du formulaire qu'au moins une case est cochée.
En temps normal, j'aurais fait :
if(document.form_creation.choix1.checked ==false) {
alert("Merci de cocher");
return false; }
Mais le fait que toutes mes cases aient le même nom me pose problème.
Auriez-vous des idées, des boucles,... à me proposer ?
Merci.
Last edited by Laurence on Thu Jan 26, 2006 12:02 pm; edited 1 time in total |
|
Back to top |
|
Laurence Smarty Rookie
Joined: 05 Jan 2006 Posts: 7
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|