Bonjour,
J'ai un formulaire. La réponse à la première question est soit oui soit non. J'aimerais afficher ensuite une question adaptée à la première réponse (c'est-à-dire si l'utilisateur à cliquer oui, poser question 2 sinon poser question 3)
J'ai fais ceci pour l'instant
j'aimerais que si Yes est coché, printé la variable $WhyRemoveApp
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 <?php $WhyRemoveApp=' <tr> <td colspan="2" valign="top" align="left">Why do you remove the application? </td> </tr> <tr> <td valign="top" colspan=2> <textarea rows=5 name="comment1" style="font-size: 9pt; width: 98%; " class="surveyContent-input" onfocus="this.className=\'surveyForm-focused\'" onblur="this.className=\'surveyContent-input\'"></textarea> </td> </tr> <tr><td colspan="2"><div class="surveyPadding-top10"></div></td> </tr> '; $WhatDidntFunction=' <tr> <td colspan="2" valign="top" align="left">What didn't function? </td> </tr> <tr> <td valign="top" colspan=2> <textarea rows=5 name="comment1" style="font-size: 9pt; width: 98%; " class="surveyContent-input" onfocus="this.className=\'surveyForm-focused\'" onblur="this.className=\'surveyContent-input\'"></textarea> </td> </tr>'; ?> ... <form method="post" action="/src/scripts/monscript"> <tr> <td colspan="2" valign="top" align="left">Did the application function? <br></td> </tr> <tr> <td colspan="2" valign="top" align="left"> <input type="radio" name="group1" value="YesAppFunctioned" > Yes<br> <input type="radio" name="group1" value="NoAppFunctioned"> No<br> </td> </tr> <!-- jaimerais faire ici soit print $WhyRemoveApp, soit print $WhatDidntFunction en fonction de la réponse à la première question --> <tr> <td></td> <td align="right"><input type="image" src="style/img/submit.gif" width="80" height="17" alt="Submit" border="0" vspace="4" hspace="6"></td> </tr> </form> ...
Cependant je ne vois pas trop comment faire cela directement lors du clic sur mon radio button et non lors du clic sur le bouton submit
Merci d'avance si quelqu'un peut m'aider
Partager