views:

122

answers:

1

hi I have this code and can't figure out what seems to be the problem: if i select 1 & 2, 1 & 3 it's working. But if I select 2 or 3 only then it's not working. What seems to be the problem? i would like to select multiple at the same time. i need your help, thanks I'm attaching the image: http://yfrog.com/3oregistrationoj

Hi again, i think I need to put some if and else here? But don't really know and sure how?

This is the code:

<div style="background-color:#CCDFED">
<form method="post" action="[~[*id*]~]">
   <input type="hidden" name="formid" value="registrationForm" />
    <table>
    <tr>
     <td>
       <label for="termine" style="margin:0.5em">Termine:</label>
     <td>
     <td>
       <input type="checkbox" name="termine1" value="Montag 4. Oktober 2010"    eform="Termine::1"/>&#09;Montag 4. Oktober 2010 <br/>
       <input type="checkbox" name="termine2" value="Mittwoch 13. Oktober 2010" />&#09;Mittwoch 13. Oktober 2010 <br/>
       <input type="checkbox" name="termine3" value="Freitag 22. Oktober 2010"  />&#09;Freitag 22. Oktober 2010 <br/>           
     </td>
    </tr>       
    <tr>
      <td><label for="email" style="margin:0.5em">Email:</label></td>
      <td><input type="text" name="email" size="60" maxlength="60" eform="Email:email:1" /><td>
    </tr> 
    <tr>
    <td>
       <label style="margin:0.5em; display:block" for="kopieren" >Bitte kopieren Sie den Anti-Spam Code ein: </label>
       <img src="[+verimageurl+]" alt="verification code" border="1" style="margin:0.5em"/></td>
     </td>
     <td valign="top"><input type="text" name="vericode" size="20" /> </td>
    </tr>        
    <tr>
      <td rowspan="3" valign="right">
         <input align="right" type="submit" name="submit" style="margin:0.5em" value="Register" />
      </td>
    </tr>
</table>    
</form>
</div>
+1  A: 

You are making them required by setting eform on all of them. Remove the ::1 eform if they are not required. I also added a validation message.

Try:

 <input type="checkbox" id="termine1" name="termine[]" value="Montag 4. Oktober 2010"    eform="Termine::1:Please select at least one box"/>&#09;Montag 4. Oktober 2010 <br/>
 <input type="checkbox" id="termine2" name="termine[]" value="Mittwoch 13. Oktober 2010" />&#09;Mittwoch 13. Oktober 2010 <br/>
 <input type="checkbox" id="termine3" name="termine[]" value="Freitag 22. Oktober 2010"  />&#09;Freitag 22. Oktober 2010 <br/>  

I am doing all of this blindly, so bare with me. Once you have submitted the form, you now need I no longer see your code for the confirmation page. All you need to change is in your report you need to use

[+termine+].
Nix
@Nix: yes i did that it is still the same:-(
tintincute
sorry i was missing the ::1
Nix
I think you need to set the same name, and if its required keep ::1 if not remove it. I also think u need to post some validation feedback back to the user. Try the above code notice the addition of id and name. Make sure you change your form code accordingly to use the new name="termine[]"
Nix
tintincute
@Nix:by the way where should I change the new name="termine[]". You mean in the first form?
tintincute
@Nix: hope you're still there, I tried the new code you gave me, but then if I select any dates, it will only display "Termine" but no dates available. hmmm don't you think we have to have different names in each forms?
tintincute