Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

[Résolu] Formulaire et cases à cocher

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French
View previous topic :: View next topic  
Author Message
Laurence
Smarty Rookie


Joined: 05 Jan 2006
Posts: 7

PostPosted: Mon Jan 23, 2006 2:58 pm    Post subject: [Résolu] Formulaire et cases à cocher Reply with quote

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> 


Arrow 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
View user's profile Send private message
Laurence
Smarty Rookie


Joined: 05 Jan 2006
Posts: 7

PostPosted: Tue Jan 24, 2006 9:30 am    Post subject: [Résolu] Reply with quote

http://www.phpinsider.com/smarty-forum/viewtopic.php?p=27537#27537

Merci à Kawette et ravsta Exclamation
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP