I am setting up a form, where registered users can order a Pas.
For this they have to log in the site and go to the specific form. In this form some known info is being retrieved from the CB tabel (comprofiler).
The user has to check these infromations and after confirming he can push on the submit button.
This is all working fine🙂
I want to build in a check, that all fields are filled in before he can hit the submit button.
Further I want to check if he has a valid avatar and not the "no_photo" picture. This picture file should then also be added to the email.
Her is my code of the form so far :
<DIV STYLE="background-color: white;">
<DIV class="form_item">
<DIV class="form_element cf_text" ><SPAN class="cf_text" >Aanmelding Bosmolenplaspas 2009/2010</SPAN></DIV>
<DIV class="clear" >Â </DIV>
</DIV>
<DIV class="form_item">
<DIV class="form_element cf_checkbox">
<LABEL class="cf_label">Ik had nog geen Bosmolenplaspas</LABEL><INPUT class="radio" id="nieuw" type="checkbox" value="ja" name="nieuw" /> </INPUT></DIV>
<DIV class="clear" >Â </DIV>
</DIV>
<DIV>
<img src="/site/images/comprofiler/{avatar}" alt="foto" /></DIV>
</BR>
<DIV class="form_element cf_hidden">
<INPUT id="voornaam" type="hidden" value="{firstname}" name="voornaam" ></INPUT>
<INPUT id="tussennaam" type="hidden" value="{middlename}" name="tussennaam"></INPUT>
<INPUT id="achternaam" type="hidden" value="{lastname}" name="achternaam"></INPUT>
<INPUT id="adres" type="hidden" value="{address}" name="adres"></INPUT>
<INPUT id="postcode" type="hidden" value="{zipcode}" name="postcode" ></INPUT>
<INPUT id="plaats" type="hidden" value="{city}" name="plaats"></INPUT>
<INPUT id="email" type="hidden" value="<?php $user = &JFactory::getUser(); echo $user->email;?>" name="email" ></INPUT>
<INPUT id="logboeknummer" type="hidden" value="{cb_logboeknummer}" name="logboeknummer"></INPUT>
<INPUT id="medische_keuring" type="hidden" value="{cb_verloopdatummedischekeruring}" name="medische_keuring"></INPUT>
<DIV class="clear" >Â </DIV>
</DIV>
<table border="0" cellspacing="2" cellpadding="4">
<tr>
<td>Naam</td>
<td>{firstname}Â {middlename}Â {lastname}</td>
</tr>
<tr>
<td>Adres</td>
<td>{address}</td>
</tr>
<tr>
<td>Postcode</td>
<td>{zipcode}</td>
</tr>
<tr>
<td>Plaats</td>
<td>{city}</td>
</tr>
<tr>
<td>email</td>
<td><?php echo $user->email;?></td>
</tr>
<tr>
<td>Adres</td>
<td>{address}</td>
</tr>
<tr>
<td>Postcode</td>
<td>{zipcode}</td>
</tr>
<tr>
<td>Plaats</td>
<td>{city}</td>
</tr>
<tr>
<td>Logboeknummer</td>
<td>{cb_logboeknummer}</td>
</tr>
<tr>
<td>Verloopdatum medische keuring</td>
<td>{cb_verloopdatummedischekeruring}</td>
</tr>
</table>
<DIV class="clear" >Â </DIV>
<DIV class="form_item" >
<DIV class="form_element cf_checkbox"><LABEL class="cf_label">Ik heb de voorwaarden gelezen en accepteer deze.</LABEL><INPUT class="radio validate-one-required" id="gelezen" type="checkbox" value="1" name="gelezen" /> <label class="check_label" for="label" >Gelezen</label>
</DIV>
</DIV>
<DIV class="clear" >Â </DIV>
<DIV class="form_item" >
<DIV class="form_element cf_checkbox"><LABEL class="cf_label">De bovenstaande gegevens en mijn pasfoto heb ik gecontroleerd en zijn compleet en correct. Indien dit niet het geval is, dan eerst deze gegevens in uw profiel wijzigen. Onvolledige aanvragen worden niet geaccepteerd</LABEL><INPUT class="radio validate-one-required" id="accoord" type="checkbox" value="1" name="accoord" /> <label class="check_label" for="label" >accoord</label></DIV>
</DIV>
<DIV class="clear" >Â </DIV>
<DIV class="form_item">
<table style="height: 84px;" border="0" cellspacing="2" cellpadding="2" width="220">
<tr>
<td align="center">Aantal</td>
<td align="center">Prijs per pas</td>
</tr>
<tr>
<td align="center">1-19</td>
<td align="center">€ 90,00</td>
</tr>
<tr>
<td align="center">20-49</td>
<td align="center">€ 82,50</td>
</tr>
<tr>
<td align="center">> 50</td>
<td align="center">€ 75,00</td>
</tr>
</table></DIV>
<DIV class="clear" >Â </DIV>
<DIV class="form_item">De kosten zullen door de penningmeester dmv automatische incasso geind worden. <br /><br />
Voor instructeurs, die lesgeven aan de Bosmolenplas, wordt het pasje vergoed door de vereniging.<br /><br />
</DIV>
<DIV class="form_item" >
<DIV class="form_element cf_captcha" ><LABEL class=cf_label >Type hier de zwarte karakters in het veld</LABEL><SPAN >{imageverification}</SPAN></DIV>
</DIV>
<DIV class=clear >Â </DIV>
<DIV class="form_item" >
<DIV class="form_element cf_button" ><INPUT value="Versturen" name="undefined" type="submit"></DIV>
</DIV>
<DIV class="clear" >Â </DIV>
</DIV>