Petite demande pour mon formulaire

2 participants

Voir le sujet précédent Voir le sujet suivant Aller en bas

Résolu Petite demande pour mon formulaire

Message par Witzz Mar 10 Avr 2012 - 12:18

Bonjour à vous.
J'ai ressemant créé un formulaire de commandes graphiques, et j'aimerai en plus que les champs soient obligatoirement remplis, que les contours des rectangles deviennent rouge en contours progressifs, avec une petite infobulle disant: Veuillez remplir ce champ.
Voilà mon code:

[code]
function envoiMessage(form){
/* Créer un message à partir des informations fournies */
var txt_message = "Pseudo: " + form.prenom.value + '\n'
+ "Adresse de votre forum: " + form.Adresse.value + '\n'

+ "Taille de l'image: " + form.Taille.value + '\n'

+ "Police d'écriture: " + form.Police.value + '\n'

+ "Taille d'écriture: " + form.Px.value + '\n'

+ "Couleur de l'écriture: " + form.Color.value + '\n'

+ "Texte à insérer: " + form.Text.value + '\n'

+ "Nature de la création : " + form.nature.value + '\n'

+ "Lien de l'image: " + form.Lien.value + '\n'

+ "Choix de l'animation:\n";
// Dans le cas des checkboxs, on va les parcourir pour prendre la valeur de celles qui sont cochées:
for(var i = 0; i < form.element.length; i++)
{
if(form.element.checked == true) { txt_message += '' + form.element[i].value + '\n'; }
}
txt_message += "Commentaires en +: " + form.code.value + '\n';
/* Insère le texte construit dans le champ caché "message" du formulaire */
form.message.value = txt_message;
}


Générateur de commandes
Cheval&Animaux


formulaire - Petite demande pour mon formulaire Peindre
Formulaire:
Cheval&Animaux met à votre disposition ce générateur de commandes. Il vous permettra de rediriger vos commandes directement à sa session (commandes).














<div style="text-align: left;">

Titre du sujet :




Pseudo :



Adresse de votre forum:
[i]*Nous n'acceptons pas les forums
sur le thème du dessin.



Taille de l'image: *en px



Police d'écriture:
*Trouver des Polices d'écritures



Taille de l'écriture: *en px




Couleur de la police


Dernière édition par Tortue le Ven 13 Avr 2012 - 17:18, édité 1 fois
Witzz

Witzz
*****

Masculin
Messages : 841
Inscrit(e) le : 30/06/2011

https://www.youtube.com/channel/UC9KGhFAG4gkDsxAnHURUQMg
Witzz a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Petite demande pour mon formulaire

Message par Witzz Jeu 12 Avr 2012 - 14:26

Pour laisser mon sujet actif, je le relance en faisant un petit UP

Mr. Green à bientôt
Witzz

Witzz
*****

Masculin
Messages : 841
Inscrit(e) le : 30/06/2011

https://www.youtube.com/channel/UC9KGhFAG4gkDsxAnHURUQMg
Witzz a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Petite demande pour mon formulaire

Message par Scoubifitz Ven 13 Avr 2012 - 5:02

bonjour,

Code:
<center><script type="text/javascript">
function envoiMessage(form){
/* Créer un message à partir des informations fournies */
var txt_message = "<strong><FONT color=YellowGreen>Pseudo</FONT>:</strong> " + form.prenom.value + '\n'
+ "<strong><FONT color=YellowGreen>Adresse de votre forum</FONT>:</strong> " + form.Adresse.value + '\n'
+ "<strong><FONT color=YellowGreen>Taille de l'image</FONT>:</strong> " + form.Taille.value + '\n'
+ "<strong><FONT color=YellowGreen>Police d'écriture</FONT>:</strong> " + form.Police.value + '\n'
+ "<strong><FONT color=YellowGreen>Taille d'écriture</FONT>:</strong> " + form.Px.value + '\n'
+ "<strong><FONT color=YellowGreen>Couleur de l'écriture</FONT>:</strong> " + form.Color.value + '\n'
+ "<strong><FONT color=YellowGreen>Texte à insérer</FONT>:</strong> " + form.Text.value + '\n'
+ "<strong><FONT color=YellowGreen>Nature de la création </FONT>:</strong> " + form.nature.value + '\n'
+ "<strong><FONT color=YellowGreen>Lien de l'image</FONT>:</strong> " + form.Lien.value + '\n'
+ "<strong><FONT color=YellowGreen>Choix de l'animation</FONT>:</strong>\n";
// Dans le cas des checkboxs, on va les parcourir pour prendre la valeur de celles qui sont cochées:
for(var i = 0; i < form.element.length; i++)
{
if(form.element[i].checked == true) { txt_message += '' + form.element[i].value + '\n'; }
}
txt_message += "<strong><FONT color=YellowGreen>Commentaires en </FONT><FONT color=#3399FF>+</FONT>:</strong>  " + form.code.value + '\n';
/* Insère le texte construit dans le champ caché "message" du formulaire */
form.message.value = txt_message;
}
</script>
<br><table style="font-size: 35px; font-family: Trebuchet MS; font-weight: bold; color: rgb(124, 186, 44); margin-left: 30px; margin-top: -20px; text-shadow: 1px 1px 2px lightgreen;"><tbody><tr><td align="left"><font size="7"><font size="7"><span style="color: YellowGreen; font-weight: normal; font-style: italic;">Générateur de commandes</span></font><br style="color: YellowGreen;"><span style="color: YellowGreen;">        <span style="font-style: italic;">Cheval&amp;</span></span><span style="color: rgb(51, 204, 255); font-style: italic;">Animaux</span></font><br></td></tr></tbody></table><p style="text-align: justify;"><span style="font-weight: bold;"><span style="color: Gray;"><span style="color: Gray;"><span style="font-weight: bold;"><span style="color: Gray;"><font size="1"><br><table border="0"><tbody><tr><td align="left"><img alt="" src="http://2img.net/i/fa/fdf/peindre.png" class="" style="display: inline;"></td><td align="left"><br><font color="#ff7900"><span style="font-size: 18px; line-height: normal;">Formulaire:</span><br><span style="font-size: 9px; line-height: normal;">Cheval&amp;Animaux met à votre disposition ce générateur de commandes. Il vous permettra de rediriger vos commandes directement à sa session (commandes). </span></font></td></tr></tbody></table></font></span></span></span></span></span></p><p style="text-align: justify;"><br></p><p style="text-align: justify;"><br></p><p style="text-align: justify;"><br></p>
<form action="/post" method="post" name="post" enctype="multipart/form-data" onsubmit="envoiMessage(this)">
<input name="lt" value="0" type="hidden">
<input name="mode" value="newtopic" type="hidden">
<input name="topictype" value="0" checked="checked" type="hidden">
<input name="message" value="" type="hidden">
<input name="f" value="18" type="hidden">
<div style="text-align: left;">

<label style="color: YellowGreen; font-weight: bold;" for="titre">Titre du sujet :</label>
<input name="subject" id="titre" value="Commande Graphique " size="25" maxlength="60" type="text"><br><br>

<label style="color: YellowGreen; font-weight: bold;" for="prenom">Pseudo :          </label> <input size="10" name="prenom" id="prenom" type="text" required="required" /> <br><br>

<label style="color: YellowGreen; font-weight: bold;" for="Adresse"> Adresse de votre forum:</label> <span style="font-weight: bold;"><font size="1"><span style="color: Red;"></span></font></span><input size="30" name="Adresse" id="Adresse" type="text" required="required" /><br><span style="font-weight: bold;"><span style="color: Silver;"><font size="1"><span style="font-style: italic;"><span style="font-weight: bold;"><span style="color: Gray;"><span style="color: rgb(204, 204, 204);">*Nous n'acceptons pas les forums</span><br style="color: rgb(204, 204, 204);"><span style="color: rgb(204, 204, 204);">sur le thème du dessin.</span><br></span></span></span></font></span></span><br>

<label style="color: YellowGreen; font-weight: bold;" for="Taille">Taille de l'image:</label> <span style="font-weight: bold;"><font size="1"><span style="color: Red;"></span></font></span><input size="5" name="Taille" id="Taille" type="text" required="required" /><font size="1"><span style="font-style: italic;"><span style="font-weight: bold;"><span style="color: Gray;">*en px</span></span></span></font><br><br>

<label style="color: YellowGreen; font-weight: bold;" for="Police">Police d'écriture:</label> <span style="font-weight: bold;"><font size="1"><span style="color: Red;"></span></font></span><input size="18" name="Police" id="Police" type="text" required="required" /><br><span style="font-weight: bold;"><span style="color: DarkRed;"><font size="1">*<span style="color: rgb(204, 51, 51);">Trouver des <a href="http://www.dafont.com/fr/">Polices d'écritures</a></span></font></span></span><br><br>

<label style="color: YellowGreen; font-weight: bold;" for="Px">Taille de l'écriture:</label> <span style="font-weight: bold;"><font size="1"><span style="color: Red;"></span></font></span><input size="4" name="Px" id="Px" type="text" required="required" /><span style="font-style: italic;"><span style="font-weight: bold;"><span style="color: Gray;"><font size="1">*en px</font></span></span></span><br><br>


<label style="color: YellowGreen;" for="Color"><b>Couleur de la police</b></label>


<input placeholder="#" id="Color" name="Color" maxlength="7" style="width: 70px;" type="text" required="required" /> <span style="font-size: 0.8em; color: rgb(153, 153, 153);"><br><span style="color: Silver;"><span style="font-style: italic;"><span style="font-weight: bold;"><font size="1"><span style="font-style: italic;"><span style="font-weight: bold;"><span style="color: rgb(204, 51, 102);">*Trouver des <a href="http://www.code-couleur.com/">codes couleurs</a></span></span></span></font></span></span></span><br><br></span> <label style="color: YellowGreen; font-weight: bold;" for="Text">Texte à insérer:</label> <span style="font-weight: bold;"><font size="1"><span style="color: Red;"></span></font></span><input size="20" name="Text" id="Text" type="text" required="required" /><br><span style="color: Silver;"><font size="1">*<span style="font-style: italic;"><span style="font-weight: bold;">Aucun texte vulgaire n'est<br>accepté.<br></span></span></font></span><br>

<label style="font-weight: bold; color: YellowGreen;" for="nature">Nature de la création: </label><select name="nature" id="nature">
<option value="boutons" selected="selected">Boutons</option>
<option value="icones">Icônes</option>
<option value="logos">Logos</option>
<option value="headers">Headers</option>
<option value="avatar">Avatars</option>
<option value="signa">Signatures</option>
<option value="fond">Fond de page</option>
<option value="smile">Smileys</option>
<option value="autres">Autres..</option>
</select><br><br><span style="color: YellowGreen;"><span style="font-weight: bold;">Lien de l'image: <span style="color: Red;"><font size="1"> </font></span></span></span><input size="30" name="Lien" id="Lien" type="text" required="required" /><br><font size="1"><span style="font-style: italic;"><span style="font-weight: bold;"><span style="color: rgb(204, 204, 204);">*Les images signées ne <br>sont pas acceptées. Les vulgaires<br>aussi.<br></span></span></span></font><br>

<br><span style="font-weight: bold; color: YellowGreen;">Choix de l'animation:</span> <br><input name="element" <input="" id="avec" value="Avec" type="checkbox"> <label style="color: DeepSkyBlue;" for="avec">Avec</label><br>
<input name="element" id="sans" value="Sans" type="checkbox"> <label style="color: DeepSkyBlue;" for="sans">Sans</label><br style="color: DeepSkyBlue;">
<input style="color: DeepSkyBlue;" name="element" id="autre" value="Autre" type="checkbox"><span style="color: DeepSkyBlue;"> </span><label style="color: DeepSkyBlue;" for="autre">Autre</label><span style="color: DeepSkyBlue;">

</span><span style="font-weight: bold;"><span style="color: YellowGreen;"><span style="color: rgb(51, 153, 255);"><br><br>Commentaire en</span> <img src="http://2img.net/i/fa/admin/icones/ajouter.png"></span></span><br>

<textarea style="width: 232px; height: 59px;" id="code" name="code" value="CV - PSEUDO " required="required"></textarea>  <br></div><div style="text-align: right;"><font style="color: Gray; text-decoration: underline;" size="1">Powered by <span style="font-style: italic;">Cheval&amp;Animaux.fr<br></span></font></div><input name="post" value="Envoyer" type="submit"></form></center>

<img src="http://fdf.aidactif.fr/paque/p7.png">
Scoubifitz

Scoubifitz
Membre actif

Masculin
Messages : 3688
Inscrit(e) le : 18/03/2008

http://scoubidous.superforum.fr/
Scoubifitz a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Petite demande pour mon formulaire

Message par Witzz Ven 13 Avr 2012 - 17:15

Merci beaucoup, c'est parfait Smile
Witzz

Witzz
*****

Masculin
Messages : 841
Inscrit(e) le : 30/06/2011

https://www.youtube.com/channel/UC9KGhFAG4gkDsxAnHURUQMg
Witzz a été remercié(e) par l'auteur de ce sujet.

Voir le sujet précédent Voir le sujet suivant Revenir en haut

- Sujets similaires

Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum