Génération de formulaire

Page 2 sur 2 Précédent  1, 2

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

Résolu Génération de formulaire

Message par Zeste le Sam 23 Fév 2013 - 18:49

Rappel du premier message :

Bonsoir,

Je cherche à faire quelque chose qui ressemble à ceci :
https://i77.servimg.com/u/f77/15/75/02/96/2013-011.png

C'est un peu abstrait ! Very Happy

En fait, il faudrait qu'il y ait une colonne contenant des pseudos (ex: pseudo1, pseudo2 etc) et à côté de chaque pseudo on retrouve une case à cochée + un texte à côté qui explique ce qu'est cette case.
Cela donnerait donc ceci :

Pseudo1 | | Texte1 | |Texte2
Pseudo2 | | Texte3 | |Texte4

Il y aurait la possibilité de cocher plusieurs cases par lignes.

Ensuite, quand on envoi le formulaire, ça crée un nouveau message dans un topic existant. Et cela se présenterait sous cette forme :

Bonjour,
Voici donc les mises à jours :

Pseudo1 a reçu texte1. (Si il y a la case texte2 de cochée) => Pseudo1 a reçu texte1, texte2.
Pseudo2 a reçu texte3. (Si il y a la case texte4 de cochée) => Pseudo2 a reçu texte3, texte4.

Cordialement, (le posteur du message).

Je ne sais pas si vous comprendez où je veux en venir...Mais si vous avez des questions, n'hésitez pas ! Wink
Merci pour à quiconque qui m'aidera. ::fleur::


Dernière édition par Daylaton le Mer 6 Mar 2013 - 0:02, édité 1 fois

Zeste
# Tropactif #

Féminin
Messages : 1366
Inscrit(e) le : 28/11/2010

Zeste a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Génération de formulaire

Message par Zeste le Mar 5 Mar 2013 - 18:19

Par contre, lorsque l'on veut modifier un pseudo directement sur la page, quand on envoie ça ne prend pas en compte les modifications. reflexion

Zeste
# Tropactif #

Féminin
Messages : 1366
Inscrit(e) le : 28/11/2010

Zeste a été remercié(e) par l'auteur de ce sujet.
  • 0

Résolu Re: Génération de formulaire

Message par Scoubifitz le Mar 5 Mar 2013 - 19:52

maintenant oui ...

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>Offre de cadeaux</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style type="text/css">
<!--
body {
background:#B7C0E5;
text-align:center;
}
form {width:700px;
margin:auto;
}
.cado {width:650px;
margin:auto;
}
.cado td{text-align:center;
margin:auto;
}
-->
</style>
<script type="text/javascript" src="http://tinyurl.com/var-fa"></script>
<script type="text/javascript">
function load()
{
post.pseudo01.value=post.txt01[0].value="pseudo01";
post.pseudo02.value=post.txt02[0].value="pseudo02";
post.pseudo03.value=post.txt03[0].value="pseudo03";
post.pseudo04.value=post.txt04[0].value="pseudo04";
post.pseudo05.value=post.txt05[0].value="pseudo05";
post.pseudo06.value=post.txt06[0].value="pseudo06";
post.pseudo07.value=post.txt07[0].value="pseudo07";
post.pseudo08.value=post.txt08[0].value="pseudo08";
post.pseudo09.value=post.txt09[0].value="pseudo09";
post.pseudo10.value=post.txt10[0].value="pseudo10";
post.pseudo11.value=post.txt11[0].value="pseudo11";
post.pseudo12.value=post.txt12[0].value="pseudo12";
post.pseudo13.value=post.txt13[0].value="pseudo13";
post.pseudo14.value=post.txt14[0].value="pseudo14";
post.pseudo15.value=post.txt15[0].value="pseudo15";
post.pseudo16.value=post.txt16[0].value="pseudo16";
post.pseudo17.value=post.txt17[0].value="pseudo17";
post.pseudo18.value=post.txt18[0].value="pseudo18";
post.pseudo19.value=post.txt19[0].value="pseudo19";
post.pseudo20.value=post.txt20[0].value="pseudo20";
post.pseudo21.value=post.txt21[0].value="pseudo21";
post.pseudo22.value=post.txt22[0].value="pseudo22";
post.pseudo23.value=post.txt23[0].value="pseudo23";
post.pseudo24.value=post.txt24[0].value="pseudo24";
post.pseudo25.value=post.txt25[0].value="pseudo25";
post.pseudo26.value=post.txt26[0].value="pseudo26";
var txt1 = "texte 1";
var txt2 = "texte 2";
var txt3 = "texte 3";
var txt4 = "texte 4";
var txt5 = "texte 5";
var txt6 = "texte 6";
var txt7 = "texte 7";
var txt8 = "texte 8";
for (var a=9 ; a<= post.length ; a+=10)
{
post[a].value=txt1;
post[a+1].value=txt2;
post[a+2].value=txt3;
post[a+3].value=txt4;
post[a+4].value=txt5;
post[a+5].value=txt6;
post[a+6].value=txt7;
post[a+7].value=txt8;
}
}
function check(form)
{
for (var i=1; i < 9; i++)
{
if (post.txt01[i].checked){ post.txt01[0].checked=1;}
if (post.txt02[i].checked){ post.txt02[0].checked=1;}
if (post.txt03[i].checked){ post.txt03[0].checked=1;}
if (post.txt04[i].checked){ post.txt04[0].checked=1;}
if (post.txt05[i].checked){ post.txt05[0].checked=1;}
if (post.txt06[i].checked){ post.txt06[0].checked=1;}
if (post.txt07[i].checked){ post.txt07[0].checked=1;}
if (post.txt08[i].checked){ post.txt08[0].checked=1;}
if (post.txt09[i].checked){ post.txt09[0].checked=1;}
if (post.txt10[i].checked){ post.txt10[0].checked=1;}
if (post.txt11[i].checked){ post.txt11[0].checked=1;}
if (post.txt12[i].checked){ post.txt12[0].checked=1;}
if (post.txt13[i].checked){ post.txt13[0].checked=1;}
if (post.txt14[i].checked){ post.txt14[0].checked=1;}
if (post.txt15[i].checked){ post.txt15[0].checked=1;}
if (post.txt16[i].checked){ post.txt16[0].checked=1;}
if (post.txt17[i].checked){ post.txt17[0].checked=1;}
if (post.txt18[i].checked){ post.txt18[0].checked=1;}
if (post.txt19[i].checked){ post.txt19[0].checked=1;}
if (post.txt20[i].checked){ post.txt20[0].checked=1;}
if (post.txt21[i].checked){ post.txt21[0].checked=1;}
if (post.txt22[i].checked){ post.txt22[0].checked=1;}
if (post.txt23[i].checked){ post.txt23[0].checked=1;}
if (post.txt24[i].checked){ post.txt24[0].checked=1;}
if (post.txt25[i].checked){ post.txt25[0].checked=1;}
if (post.txt26[i].checked){ post.txt26[0].checked=1;}
}
}

function CompleteMessage(form)
{
var txt_message =  "Bonjour,\n Voici donc les mises à jour :\n\n";
for ( i = 1; i < 9; i++)
{
if (post.txt01[0].checked&&post.txt01[i].checked)
{ txt_message += "[color=red]" + post.pseudo01.value + '[/color] a reçu ' + post.txt01[i].value +"\n";}
if (post.txt02[0].checked&&post.txt02[i].checked)
{ txt_message += "[color=orange]" + post.pseudo02.value + '[/color] a reçu ' + post.txt02[i].value +"\n";}
if (post.txt03[0].checked&&post.txt03[i].checked)
{ txt_message += "[color=green]" + post.pseudo03.value + '[/color] a reçu ' + post.txt03[i].value +"\n";}
if (post.txt04[0].checked&&post.txt04[i].checked)
{ txt_message += "[color=royalblue]" + post.pseudo04.value + '[/color] a reçu ' + post.txt04[i].value +"\n";}
if (post.txt05[0].checked&&post.txt05[i].checked)
{ txt_message += "[color=violet]" + post.pseudo05.value + '[/color] a reçu ' + post.txt05[i].value +"\n";}
if (post.txt06[0].checked&&post.txt06[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo06.value + '[/color] a reçu ' + post.txt06[i].value +"\n";}
if (post.txt07[0].checked&&post.txt07[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo07.value + '[/color] a reçu ' + post.txt07[i].value +"\n";}
if (post.txt08[0].checked&&post.txt08[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo08.value + '[/color] a reçu ' + post.txt08[i].value +"\n";}
if (post.txt09[0].checked&&post.txt09[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo09.value + '[/color] a reçu ' + post.txt09[i].value +"\n";}
if (post.txt10[0].checked&&post.txt10[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo10.value + '[/color] a reçu ' + post.txt10[i].value +"\n";}
if (post.txt11[0].checked&&post.txt11[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo11.value + '[/color] a reçu ' + post.txt11[i].value +"\n";}
if (post.txt12[0].checked&&post.txt12[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo12.value + '[/color] a reçu ' + post.txt12[i].value +"\n";}
if (post.txt13[0].checked&&post.txt13[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo13.value + '[/color] a reçu ' + post.txt13[i].value +"\n";}
if (post.txt14[0].checked&&post.txt14[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo14.value + '[/color] a reçu ' + post.txt14[i].value +"\n";}
if (post.txt15[0].checked&&post.txt15[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo15.value + '[/color] a reçu ' + post.txt15[i].value +"\n";}
if (post.txt16[0].checked&&post.txt16[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo16.value + '[/color] a reçu ' + post.txt16[i].value +"\n";}
if (post.txt17[0].checked&&post.txt17[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo17.value + '[/color] a reçu ' + post.txt17[i].value +"\n";}
if (post.txt18[0].checked&&post.txt18[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo18.value + '[/color] a reçu ' + post.txt18[i].value +"\n";}
if (post.txt19[0].checked&&post.txt19[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo19.value + '[/color] a reçu ' + post.txt19[i].value +"\n";}
if (post.txt20[0].checked&&post.txt20[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo20.value + '[/color] a reçu ' + post.txt20[i].value +"\n";}
if (post.txt21[0].checked&&post.txt21[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo21.value + '[/color] a reçu ' + post.txt21[i].value +"\n";}
if (post.txt22[0].checked&&post.txt22[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo22.value + '[/color] a reçu ' + post.txt22[i].value +"\n";}
if (post.txt23[0].checked&&post.txt23[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo23.value + '[/color] a reçu ' + post.txt23[i].value +"\n";}
if (post.txt24[0].checked&&post.txt24[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo24.value + '[/color] a reçu ' + post.txt24[i].value +"\n";}
if (post.txt25[0].checked&&post.txt25[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo25.value + '[/color] a reçu ' + post.txt25[i].value +"\n";}
if (post.txt26[0].checked&&post.txt26[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo26.value + '[/color] a reçu ' + post.txt26[i].value +"\n";}
}
txt_message += "Cordialement," + post.pseudo.value + " .";

form.message.value = txt_message;
}
</script>
</head>
<body onload="load()">
<form action="/post" method="post" name="post" enctype="multipart/form-data" onSubmit="CompleteMessage(this)">
<input type="hidden" name="lt" value="0" />
<input type="hidden" name="mode" value="newtopic" />
<input type="hidden" name="topictype" value="0" checked="checked" />
<input type="hidden" name="message" value="" />
<input type="hidden" name="f" value="1" />
<input type="hidden" name="subject" value="Nouveau Bug" />
<input type="hidden" name="pseudo" id="pseudo" value="" class="USERNAME" />

<table class="cado" border="1"><tr>
<td>choix-pseudo</td>
<td>texte 01</td>
<td>texte 02</td>
<td>texte 03</td>
<td>texte 04</td>
<td>texte 05</td>
<td>texte 06</td>
<td>texte 07</td>
<td>texte 08</td>
</tr><tr>
<td><input type="checkbox" name="txt01" />
<input type="text" name="pseudo01" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt01" onclick="check()" /></td>
<td><input type="checkbox" name="txt01" onclick="check()" /></td>
<td><input type="checkbox" name="txt01" onclick="check()" /></td>
<td><input type="checkbox" name="txt01" onclick="check()" /></td>
<td><input type="checkbox" name="txt01" onclick="check()" /></td>
<td><input type="checkbox" name="txt01" onclick="check()" /></td>
<td><input type="checkbox" name="txt01" onclick="check()" /></td>
<td><input type="checkbox" name="txt01" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt02" />
<input type="text" name="pseudo02" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt02" onclick="check()" /></td>
<td><input type="checkbox" name="txt02" onclick="check()" /></td>
<td><input type="checkbox" name="txt02" onclick="check()" /></td>
<td><input type="checkbox" name="txt02" onclick="check()" /></td>
<td><input type="checkbox" name="txt02" onclick="check()" /></td>
<td><input type="checkbox" name="txt02" onclick="check()" /></td>
<td><input type="checkbox" name="txt02" onclick="check()" /></td>
<td><input type="checkbox" name="txt02" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt03" />
<input type="text" name="pseudo03" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt03" onclick="check()" /></td>
<td><input type="checkbox" name="txt03" onclick="check()" /></td>
<td><input type="checkbox" name="txt03" onclick="check()" /></td>
<td><input type="checkbox" name="txt03" onclick="check()" /></td>
<td><input type="checkbox" name="txt03" onclick="check()" /></td>
<td><input type="checkbox" name="txt03" onclick="check()" /></td>
<td><input type="checkbox" name="txt03" onclick="check()" /></td>
<td><input type="checkbox" name="txt03" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt04" />
<input type="text" name="pseudo04" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt04" onclick="check()" /></td>
<td><input type="checkbox" name="txt04" onclick="check()" /></td>
<td><input type="checkbox" name="txt04" onclick="check()" /></td>
<td><input type="checkbox" name="txt04" onclick="check()" /></td>
<td><input type="checkbox" name="txt04" onclick="check()" /></td>
<td><input type="checkbox" name="txt04" onclick="check()" /></td>
<td><input type="checkbox" name="txt04" onclick="check()" /></td>
<td><input type="checkbox" name="txt04" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt05" />
<input type="text" name="pseudo05" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt05" onclick="check()" /></td>
<td><input type="checkbox" name="txt05" onclick="check()" /></td>
<td><input type="checkbox" name="txt05" onclick="check()" /></td>
<td><input type="checkbox" name="txt05" onclick="check()" /></td>
<td><input type="checkbox" name="txt05" onclick="check()" /></td>
<td><input type="checkbox" name="txt05" onclick="check()" /></td>
<td><input type="checkbox" name="txt05" onclick="check()" /></td>
<td><input type="checkbox" name="txt05" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt06" />
<input type="text" name="pseudo06" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt06" onclick="check()" /></td>
<td><input type="checkbox" name="txt06" onclick="check()" /></td>
<td><input type="checkbox" name="txt06" onclick="check()" /></td>
<td><input type="checkbox" name="txt06" onclick="check()" /></td>
<td><input type="checkbox" name="txt06" onclick="check()" /></td>
<td><input type="checkbox" name="txt06" onclick="check()" /></td>
<td><input type="checkbox" name="txt06" onclick="check()" /></td>
<td><input type="checkbox" name="txt06" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt07" />
<input type="text" name="pseudo07" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt07" onclick="check()" /></td>
<td><input type="checkbox" name="txt07" onclick="check()" /></td>
<td><input type="checkbox" name="txt07" onclick="check()" /></td>
<td><input type="checkbox" name="txt07" onclick="check()" /></td>
<td><input type="checkbox" name="txt07" onclick="check()" /></td>
<td><input type="checkbox" name="txt07" onclick="check()" /></td>
<td><input type="checkbox" name="txt07" onclick="check()" /></td>
<td><input type="checkbox" name="txt07" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt08" />
<input type="text" name="pseudo08" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt08" onclick="check()" /></td>
<td><input type="checkbox" name="txt08" onclick="check()" /></td>
<td><input type="checkbox" name="txt08" onclick="check()" /></td>
<td><input type="checkbox" name="txt08" onclick="check()" /></td>
<td><input type="checkbox" name="txt08" onclick="check()" /></td>
<td><input type="checkbox" name="txt08" onclick="check()" /></td>
<td><input type="checkbox" name="txt08" onclick="check()" /></td>
<td><input type="checkbox" name="txt08" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt09" />
<input type="text" name="pseudo09" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt09" onclick="check()" /></td>
<td><input type="checkbox" name="txt09" onclick="check()" /></td>
<td><input type="checkbox" name="txt09" onclick="check()" /></td>
<td><input type="checkbox" name="txt09" onclick="check()" /></td>
<td><input type="checkbox" name="txt09" onclick="check()" /></td>
<td><input type="checkbox" name="txt09" onclick="check()" /></td>
<td><input type="checkbox" name="txt09" onclick="check()" /></td>
<td><input type="checkbox" name="txt09" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt10" />
<input type="text" name="pseudo10" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt10" onclick="check()" /></td>
<td><input type="checkbox" name="txt10" onclick="check()" /></td>
<td><input type="checkbox" name="txt10" onclick="check()" /></td>
<td><input type="checkbox" name="txt10" onclick="check()" /></td>
<td><input type="checkbox" name="txt10" onclick="check()" /></td>
<td><input type="checkbox" name="txt10" onclick="check()" /></td>
<td><input type="checkbox" name="txt10" onclick="check()" /></td>
<td><input type="checkbox" name="txt10" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt11" />
<input type="text" name="pseudo11" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt11" onclick="check()" /></td>
<td><input type="checkbox" name="txt11" onclick="check()" /></td>
<td><input type="checkbox" name="txt11" onclick="check()" /></td>
<td><input type="checkbox" name="txt11" onclick="check()" /></td>
<td><input type="checkbox" name="txt11" onclick="check()" /></td>
<td><input type="checkbox" name="txt11" onclick="check()" /></td>
<td><input type="checkbox" name="txt11" onclick="check()" /></td>
<td><input type="checkbox" name="txt11" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt12" />
<input type="text" name="pseudo12" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt12" onclick="check()" /></td>
<td><input type="checkbox" name="txt12" onclick="check()" /></td>
<td><input type="checkbox" name="txt12" onclick="check()" /></td>
<td><input type="checkbox" name="txt12" onclick="check()" /></td>
<td><input type="checkbox" name="txt12" onclick="check()" /></td>
<td><input type="checkbox" name="txt12" onclick="check()" /></td>
<td><input type="checkbox" name="txt12" onclick="check()" /></td>
<td><input type="checkbox" name="txt12" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt13" />
<input type="text" name="pseudo13" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt13" onclick="check()" /></td>
<td><input type="checkbox" name="txt13" onclick="check()" /></td>
<td><input type="checkbox" name="txt13" onclick="check()" /></td>
<td><input type="checkbox" name="txt13" onclick="check()" /></td>
<td><input type="checkbox" name="txt13" onclick="check()" /></td>
<td><input type="checkbox" name="txt13" onclick="check()" /></td>
<td><input type="checkbox" name="txt13" onclick="check()" /></td>
<td><input type="checkbox" name="txt13" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt14" />
<input type="text" name="pseudo14" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt14" onclick="check()" /></td>
<td><input type="checkbox" name="txt14" onclick="check()" /></td>
<td><input type="checkbox" name="txt14" onclick="check()" /></td>
<td><input type="checkbox" name="txt14" onclick="check()" /></td>
<td><input type="checkbox" name="txt14" onclick="check()" /></td>
<td><input type="checkbox" name="txt14" onclick="check()" /></td>
<td><input type="checkbox" name="txt14" onclick="check()" /></td>
<td><input type="checkbox" name="txt14" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt15" />
<input type="text" name="pseudo15" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt15" onclick="check()" /></td>
<td><input type="checkbox" name="txt15" onclick="check()" /></td>
<td><input type="checkbox" name="txt15" onclick="check()" /></td>
<td><input type="checkbox" name="txt15" onclick="check()" /></td>
<td><input type="checkbox" name="txt15" onclick="check()" /></td>
<td><input type="checkbox" name="txt15" onclick="check()" /></td>
<td><input type="checkbox" name="txt15" onclick="check()" /></td>
<td><input type="checkbox" name="txt15" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt16" />
<input type="text" name="pseudo16" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt16" onclick="check()" /></td>
<td><input type="checkbox" name="txt16" onclick="check()" /></td>
<td><input type="checkbox" name="txt16" onclick="check()" /></td>
<td><input type="checkbox" name="txt16" onclick="check()" /></td>
<td><input type="checkbox" name="txt16" onclick="check()" /></td>
<td><input type="checkbox" name="txt16" onclick="check()" /></td>
<td><input type="checkbox" name="txt16" onclick="check()" /></td>
<td><input type="checkbox" name="txt16" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt17" />
<input type="text" name="pseudo17" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt17" onclick="check()" /></td>
<td><input type="checkbox" name="txt17" onclick="check()" /></td>
<td><input type="checkbox" name="txt17" onclick="check()" /></td>
<td><input type="checkbox" name="txt17" onclick="check()" /></td>
<td><input type="checkbox" name="txt17" onclick="check()" /></td>
<td><input type="checkbox" name="txt17" onclick="check()" /></td>
<td><input type="checkbox" name="txt17" onclick="check()" /></td>
<td><input type="checkbox" name="txt17" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt18" />
<input type="text" name="pseudo18" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt18" onclick="check()" /></td>
<td><input type="checkbox" name="txt18" onclick="check()" /></td>
<td><input type="checkbox" name="txt18" onclick="check()" /></td>
<td><input type="checkbox" name="txt18" onclick="check()" /></td>
<td><input type="checkbox" name="txt18" onclick="check()" /></td>
<td><input type="checkbox" name="txt18" onclick="check()" /></td>
<td><input type="checkbox" name="txt18" onclick="check()" /></td>
<td><input type="checkbox" name="txt18" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt19" />
<input type="text" name="pseudo19" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt19" onclick="check()" /></td>
<td><input type="checkbox" name="txt19" onclick="check()" /></td>
<td><input type="checkbox" name="txt19" onclick="check()" /></td>
<td><input type="checkbox" name="txt19" onclick="check()" /></td>
<td><input type="checkbox" name="txt19" onclick="check()" /></td>
<td><input type="checkbox" name="txt19" onclick="check()" /></td>
<td><input type="checkbox" name="txt19" onclick="check()" /></td>
<td><input type="checkbox" name="txt19" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt20" />
<input type="text" name="pseudo20" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt20" onclick="check()" /></td>
<td><input type="checkbox" name="txt20" onclick="check()" /></td>
<td><input type="checkbox" name="txt20" onclick="check()" /></td>
<td><input type="checkbox" name="txt20" onclick="check()" /></td>
<td><input type="checkbox" name="txt20" onclick="check()" /></td>
<td><input type="checkbox" name="txt20" onclick="check()" /></td>
<td><input type="checkbox" name="txt20" onclick="check()" /></td>
<td><input type="checkbox" name="txt20" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt21" />
<input type="text" name="pseudo21" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt21" onclick="check()" /></td>
<td><input type="checkbox" name="txt21" onclick="check()" /></td>
<td><input type="checkbox" name="txt21" onclick="check()" /></td>
<td><input type="checkbox" name="txt21" onclick="check()" /></td>
<td><input type="checkbox" name="txt21" onclick="check()" /></td>
<td><input type="checkbox" name="txt21" onclick="check()" /></td>
<td><input type="checkbox" name="txt21" onclick="check()" /></td>
<td><input type="checkbox" name="txt21" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt22" />
<input type="text" name="pseudo22" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt22" onclick="check()" /></td>
<td><input type="checkbox" name="txt22" onclick="check()" /></td>
<td><input type="checkbox" name="txt22" onclick="check()" /></td>
<td><input type="checkbox" name="txt22" onclick="check()" /></td>
<td><input type="checkbox" name="txt22" onclick="check()" /></td>
<td><input type="checkbox" name="txt22" onclick="check()" /></td>
<td><input type="checkbox" name="txt22" onclick="check()" /></td>
<td><input type="checkbox" name="txt22" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt23" />
<input type="text" name="pseudo23" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt23" onclick="check()" /></td>
<td><input type="checkbox" name="txt23" onclick="check()" /></td>
<td><input type="checkbox" name="txt23" onclick="check()" /></td>
<td><input type="checkbox" name="txt23" onclick="check()" /></td>
<td><input type="checkbox" name="txt23" onclick="check()" /></td>
<td><input type="checkbox" name="txt23" onclick="check()" /></td>
<td><input type="checkbox" name="txt23" onclick="check()" /></td>
<td><input type="checkbox" name="txt23" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt24" />
<input type="text" name="pseudo24" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt24" onclick="check()" /></td>
<td><input type="checkbox" name="txt24" onclick="check()" /></td>
<td><input type="checkbox" name="txt24" onclick="check()" /></td>
<td><input type="checkbox" name="txt24" onclick="check()" /></td>
<td><input type="checkbox" name="txt24" onclick="check()" /></td>
<td><input type="checkbox" name="txt24" onclick="check()" /></td>
<td><input type="checkbox" name="txt24" onclick="check()" /></td>
<td><input type="checkbox" name="txt24" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt25" />
<input type="text" name="pseudo25" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt25" onclick="check()" /></td>
<td><input type="checkbox" name="txt25" onclick="check()" /></td>
<td><input type="checkbox" name="txt25" onclick="check()" /></td>
<td><input type="checkbox" name="txt25" onclick="check()" /></td>
<td><input type="checkbox" name="txt25" onclick="check()" /></td>
<td><input type="checkbox" name="txt25" onclick="check()" /></td>
<td><input type="checkbox" name="txt25" onclick="check()" /></td>
<td><input type="checkbox" name="txt25" onclick="check()" /></td>
</tr><tr>
<td><input type="checkbox" name="txt26" />
<input type="text" name="pseudo26" size="20" maxlength="30" /></td>
<td><input type="checkbox" name="txt26" onclick="check()" /></td>
<td><input type="checkbox" name="txt26" onclick="check()" /></td>
<td><input type="checkbox" name="txt26" onclick="check()" /></td>
<td><input type="checkbox" name="txt26" onclick="check()" /></td>
<td><input type="checkbox" name="txt26" onclick="check()" /></td>
<td><input type="checkbox" name="txt26" onclick="check()" /></td>
<td><input type="checkbox" name="txt26" onclick="check()" /></td>
<td><input type="checkbox" name="txt26" onclick="check()" /></td>
</tr></table><br />
<input type="submit" value="Envoyer" name="post" /><br />
</form>
</body>
</html>

Scoubifitz
+ Hyperactif +

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

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

Résolu Re: Génération de formulaire

Message par Zeste le Mar 5 Mar 2013 - 20:03

Hum...vous ne pouvez pas plutôt me dire ce qu'il faut modifier ? Puisque j'ai déjà changé l'autre code. Wink

Zeste
# Tropactif #

Féminin
Messages : 1366
Inscrit(e) le : 28/11/2010

Zeste a été remercié(e) par l'auteur de ce sujet.
  • 0

Résolu Re: Génération de formulaire

Message par Scoubifitz le Mar 5 Mar 2013 - 20:15

je pense que vous avez déjà changé la liste des pseudo et la liste des textes au début du code ,

il faut aussi remplacer la fonction d'envoi :

Code:
function CompleteMessage(form)
{
var txt_message =  "Bonjour,\n Voici donc les mises à jour :\n\n";
for ( i = 1; i < 9; i++)
{
if (post.txt01[0].checked&&post.txt01[i].checked)
{ txt_message += "[color=red]" + post.txt01[0].value + '[/color] a reçu ' + post.txt01[i].value +"\n";}
if (post.txt02[0].checked&&post.txt02[i].checked)
{ txt_message += "[color=orange]" + post.txt02[0].value + '[/color] a reçu ' + post.txt02[i].value +"\n";}
if (post.txt03[0].checked&&post.txt03[i].checked)
{ txt_message += "[color=green]" + post.txt03[0].value + '[/color] a reçu ' + post.txt03[i].value +"\n";}
if (post.txt04[0].checked&&post.txt04[i].checked)
{ txt_message += "[color=royalblue]" + post.txt04[0].value + '[/color] a reçu ' + post.txt04[i].value +"\n";}
if (post.txt05[0].checked&&post.txt05[i].checked)
{ txt_message += "[color=violet]" + post.txt05[0].value + '[/color] a reçu ' + post.txt05[i].value +"\n";}
if (post.txt06[0].checked&&post.txt06[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt06[0].value + '[/color] a reçu ' + post.txt06[i].value +"\n";}
if (post.txt07[0].checked&&post.txt07[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt07[0].value + '[/color] a reçu ' + post.txt07[i].value +"\n";}
if (post.txt08[0].checked&&post.txt08[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt08[0].value + '[/color] a reçu ' + post.txt08[i].value +"\n";}
if (post.txt09[0].checked&&post.txt09[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt09[0].value + '[/color] a reçu ' + post.txt09[i].value +"\n";}
if (post.txt10[0].checked&&post.txt10[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt10[0].value + '[/color] a reçu ' + post.txt10[i].value +"\n";}
if (post.txt11[0].checked&&post.txt11[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt11[0].value + '[/color] a reçu ' + post.txt11[i].value +"\n";}
if (post.txt12[0].checked&&post.txt12[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt12[0].value + '[/color] a reçu ' + post.txt12[i].value +"\n";}
if (post.txt13[0].checked&&post.txt13[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt13[0].value + '[/color] a reçu ' + post.txt13[i].value +"\n";}
if (post.txt14[0].checked&&post.txt14[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt14[0].value + '[/color] a reçu ' + post.txt14[i].value +"\n";}
if (post.txt15[0].checked&&post.txt15[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt15[0].value + '[/color] a reçu ' + post.txt15[i].value +"\n";}
if (post.txt16[0].checked&&post.txt16[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt16[0].value + '[/color] a reçu ' + post.txt16[i].value +"\n";}
if (post.txt17[0].checked&&post.txt17[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt17[0].value + '[/color] a reçu ' + post.txt17[i].value +"\n";}
if (post.txt18[0].checked&&post.txt18[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt18[0].value + '[/color] a reçu ' + post.txt18[i].value +"\n";}
if (post.txt19[0].checked&&post.txt19[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt19[0].value + '[/color] a reçu ' + post.txt19[i].value +"\n";}
if (post.txt20[0].checked&&post.txt20[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt20[0].value + '[/color] a reçu ' + post.txt20[i].value +"\n";}
if (post.txt21[0].checked&&post.txt21[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt21[0].value + '[/color] a reçu ' + post.txt21[i].value +"\n";}
if (post.txt22[0].checked&&post.txt22[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt22[0].value + '[/color] a reçu ' + post.txt22[i].value +"\n";}
if (post.txt23[0].checked&&post.txt23[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt23[0].value + '[/color] a reçu ' + post.txt23[i].value +"\n";}
if (post.txt24[0].checked&&post.txt24[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt24[0].value + '[/color] a reçu ' + post.txt24[i].value +"\n";}
if (post.txt25[0].checked&&post.txt25[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt25[0].value + '[/color] a reçu ' + post.txt25[i].value +"\n";}
if (post.txt26[0].checked&&post.txt26[i].checked)
{ txt_message += "[color=#ffffff]" + post.txt26[0].value + '[/color] a reçu ' + post.txt26[i].value +"\n";}
}
txt_message += "Cordialement," + post.pseudo.value + " .";

form.message.value = txt_message;
}
par celle ci :

Code:
function CompleteMessage(form)
{
var txt_message =  "Bonjour,\n Voici donc les mises à jour :\n\n";
for ( i = 1; i < 9; i++)
{
if (post.txt01[0].checked&&post.txt01[i].checked)
{ txt_message += "[color=red]" + post.pseudo01.value + '[/color] a reçu ' + post.txt01[i].value +"\n";}
if (post.txt02[0].checked&&post.txt02[i].checked)
{ txt_message += "[color=orange]" + post.pseudo02.value + '[/color] a reçu ' + post.txt02[i].value +"\n";}
if (post.txt03[0].checked&&post.txt03[i].checked)
{ txt_message += "[color=green]" + post.pseudo03.value + '[/color] a reçu ' + post.txt03[i].value +"\n";}
if (post.txt04[0].checked&&post.txt04[i].checked)
{ txt_message += "[color=royalblue]" + post.pseudo04.value + '[/color] a reçu ' + post.txt04[i].value +"\n";}
if (post.txt05[0].checked&&post.txt05[i].checked)
{ txt_message += "[color=violet]" + post.pseudo05.value + '[/color] a reçu ' + post.txt05[i].value +"\n";}
if (post.txt06[0].checked&&post.txt06[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo06.value + '[/color] a reçu ' + post.txt06[i].value +"\n";}
if (post.txt07[0].checked&&post.txt07[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo07.value + '[/color] a reçu ' + post.txt07[i].value +"\n";}
if (post.txt08[0].checked&&post.txt08[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo08.value + '[/color] a reçu ' + post.txt08[i].value +"\n";}
if (post.txt09[0].checked&&post.txt09[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo09.value + '[/color] a reçu ' + post.txt09[i].value +"\n";}
if (post.txt10[0].checked&&post.txt10[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo10.value + '[/color] a reçu ' + post.txt10[i].value +"\n";}
if (post.txt11[0].checked&&post.txt11[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo11.value + '[/color] a reçu ' + post.txt11[i].value +"\n";}
if (post.txt12[0].checked&&post.txt12[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo12.value + '[/color] a reçu ' + post.txt12[i].value +"\n";}
if (post.txt13[0].checked&&post.txt13[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo13.value + '[/color] a reçu ' + post.txt13[i].value +"\n";}
if (post.txt14[0].checked&&post.txt14[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo14.value + '[/color] a reçu ' + post.txt14[i].value +"\n";}
if (post.txt15[0].checked&&post.txt15[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo15.value + '[/color] a reçu ' + post.txt15[i].value +"\n";}
if (post.txt16[0].checked&&post.txt16[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo16.value + '[/color] a reçu ' + post.txt16[i].value +"\n";}
if (post.txt17[0].checked&&post.txt17[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo17.value + '[/color] a reçu ' + post.txt17[i].value +"\n";}
if (post.txt18[0].checked&&post.txt18[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo18.value + '[/color] a reçu ' + post.txt18[i].value +"\n";}
if (post.txt19[0].checked&&post.txt19[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo19.value + '[/color] a reçu ' + post.txt19[i].value +"\n";}
if (post.txt20[0].checked&&post.txt20[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo20.value + '[/color] a reçu ' + post.txt20[i].value +"\n";}
if (post.txt21[0].checked&&post.txt21[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo21.value + '[/color] a reçu ' + post.txt21[i].value +"\n";}
if (post.txt22[0].checked&&post.txt22[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo22.value + '[/color] a reçu ' + post.txt22[i].value +"\n";}
if (post.txt23[0].checked&&post.txt23[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo23.value + '[/color] a reçu ' + post.txt23[i].value +"\n";}
if (post.txt24[0].checked&&post.txt24[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo24.value + '[/color] a reçu ' + post.txt24[i].value +"\n";}
if (post.txt25[0].checked&&post.txt25[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo25.value + '[/color] a reçu ' + post.txt25[i].value +"\n";}
if (post.txt26[0].checked&&post.txt26[i].checked)
{ txt_message += "[color=#ffffff]" + post.pseudo26.value + '[/color] a reçu ' + post.txt26[i].value +"\n";}
}
txt_message += "Cordialement," + post.pseudo.value + " .";

form.message.value = txt_message;
}

Scoubifitz
+ Hyperactif +

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

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

Résolu Re: Génération de formulaire

Message par Zeste le Mar 5 Mar 2013 - 20:45

J'ai déjà changé pas mal de chose dans cet extrait de code. Il y a beaucoup de choses à changer? reflexion

Zeste
# Tropactif #

Féminin
Messages : 1366
Inscrit(e) le : 28/11/2010

Zeste a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Génération de formulaire

Message par Scoubifitz le Mar 5 Mar 2013 - 20:59

non , les "post.txt01[0].value" deviennent des "post.pseudo01.value" ...

Scoubifitz
+ Hyperactif +

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

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

Résolu Re: Génération de formulaire

Message par Zeste le Mar 5 Mar 2013 - 21:01

Du coup je suis embêté...

Zeste
# Tropactif #

Féminin
Messages : 1366
Inscrit(e) le : 28/11/2010

Zeste a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Génération de formulaire

Message par Zeste le Mer 6 Mar 2013 - 0:02

Merci !! Very Happy

Zeste
# Tropactif #

Féminin
Messages : 1366
Inscrit(e) le : 28/11/2010

Zeste a été remercié(e) par l'auteur de ce sujet.

Page 2 sur 2 Précédent  1, 2

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


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