Forums

Empty form can be sent

schnitz123 20 Apr, 2011
Hi, sorry for the noob question, i don't really know much about chrono and joomla. i have a form on a website, which was made with the wizard, it all works fine apart from the validation, nothing gets validated, that is: you can send an empty form if you want!

Here is the code:

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">PERSONAL INFORMATION</span> </div>
  <div class="cfclear"> </div>
</div>

<input value="" id="hidden_3" name="fcourse" type="hidden" />

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 300px;">Full name (first & last)</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_1" name="fname" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 300px;">Email address (please check carefully!)</label>
    <input class="cf_inputbox required validate-email" maxlength="150" size="30" title="" id="text_2" name="femail" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 300px;">Nationality</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_4" name="text_4" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 300px;">Year of birth</label>
    <input class="cf_inputbox validate-digits required" maxlength="150" size="30" title="" id="text_7" name="text_7" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="width: 300px;">Gender</label>
    <div class="float_left">
      <input value="Male" title="" class="radio validate-one-required" id="radio00" name="radio0" type="radio" />
      <label for="radio00" class="radio_label">Male</label>
      <br />
      
<input value="Female" title="" class="radio validate-one-required" id="radio01" name="radio0" type="radio" />
      <label for="radio01" class="radio_label">Female</label>
      <br />
      

    </div>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">COURSE INFORMATION & DISCIPLINE</span> </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_dropdown">
    <label class="cf_label" style="width: 300px;">Please specify the date of the course</label>
    <select class="cf_inputbox required validate-selection" id="select_26" size="1" title=""  name="fdates">
    <option value="">Select one</option>
      <option value="3 MAY 2011 - 12 MAY 2011">3 MAY 2011 - 12 MAY 2011</option>
<option value="16 MAY 2011 - 25 MAY 2011">16 MAY 2011 - 25 MAY 2011</option>
<option value="4 JUN 2011 - 13 JUN 2011">4 JUN 2011 - 13 JUN 2011</option>
<option value="30 JUN 2011 - 9 JUL 2011">30 JUN 2011 - 9 JUL 2011</option>

    </select>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="width: 300px;">Have you read all the information on our website about the introductory course carefully?</label>
    <div class="float_left">
      <input value="Yes" title="" class="radio validate-one-required" id="radio10" name="radio1" type="radio" />
      <label for="radio10" class="radio_label">Yes</label>
      <br />
      
<input value="No" title="" class="radio validate-one-required" id="radio11" name="radio1" type="radio" />
      <label for="radio11" class="radio_label">No</label>
      <br />
      

    </div>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="width: 300px;">Do you agree to keep the course discipline:     * To settle all travel arrangements, calls, e-mails etc before starting the course  * To attend all the sessions * Come to sessions on time * To keep the silence * Not to leave Tushita property for the entire course</label>
    <div class="float_left">
      <input value="Yes" title="" class="radio validate-one-required" id="radio20" name="radio2" type="radio" />
      <label for="radio20" class="radio_label">Yes</label>
      <br />
      
<input value="No" title="" class="radio validate-one-required" id="radio21" name="radio2" type="radio" />
      <label for="radio21" class="radio_label">No</label>
      <br />
      

    </div>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">MENTAL & PHYSICAL HEALTH</span> </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="width: 300px;">Do you have any history of mental health problems?</label>
    <div class="float_left">
      <input value="Yes" title="" class="radio validate-one-required" id="radio30" name="radio3" type="radio" />
      <label for="radio30" class="radio_label">Yes</label>
      <br />
      
<input value="No" title="" class="radio validate-one-required" id="radio31" name="radio3" type="radio" />
      <label for="radio31" class="radio_label">No</label>
      <br />
      

    </div>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="width: 300px;">Have you lately / presently been experiencing severe emotional stress or depression?</label>
    <div class="float_left">
      <input value="Yes" title="" class="radio validate-one-required" id="radio30" name="radio3" type="radio" />
      <label for="radio30" class="radio_label">Yes</label>
      <br />
      
<input value="No" title="" class="radio validate-one-required" id="radio31" name="radio3" type="radio" />
      <label for="radio31" class="radio_label">No</label>
      <br />
      

    </div>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 300px;">If yes to either question, do you feel stable and relaxed enough to participate on this course, given that we cannot provide one-on-one counselling? Please give details.</label>
    <input class="cf_inputbox" maxlength="500" size="30" title="" id="text_16" name="text_16" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="width: 300px;">Do you have a medical condition which may affect your ability to participate on the course?</label>
    <div class="float_left">
      <input value="Yes" title="" class="radio" id="radio40" name="radio4" type="radio" />
      <label for="radio40" class="radio_label">Yes</label>
      <br />
      
<input value="No" title="" class="radio" id="radio41" name="radio4" type="radio" />
      <label for="radio41" class="radio_label">No</label>
      <br />
      

    </div>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 300px;">If yes, please give details.</label>
    <input class="cf_inputbox" maxlength="500" size="30" title="" id="text_18" name="text_18" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">PREVIOUS EXPERIENCE</span> </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="width: 300px;">How would you describe your experience level within Buddhism?</label>
    <div class="float_left">
      <input value="Complete beginner (no previous contact with Buddhism)" title="" class="radio validate-one-required" id="radio60" name="radio6" type="radio" />
      <label for="radio60" class="radio_label">Complete beginner (no previous contact with Buddhism)</label>
      <br />
      
<input value="Some experience (I have read some books on Buddhism / tried meditation)" title="" class="radio validate-one-required" id="radio61" name="radio6" type="radio" />
      <label for="radio61" class="radio_label">Some experience (I have read some books on Buddhism / tried meditation)</label>
      <br />
      
<input value="Previous experience (I have taken Buddhist philosophy courses / meditation retreats before)" title="" class="radio validate-one-required" id="radio62" name="radio6" type="radio" />
      <label for="radio62" class="radio_label">Previous experience (I have taken Buddhist philosophy courses / meditation retreats before)</label>
      <br />
      
<input value="Buddhist practitioner (I have taken refuge)" title="" class="radio validate-one-required" id="radio63" name="radio6" type="radio" />
      <label for="radio63" class="radio_label">Buddhist practitioner (I have taken refuge)</label>
      <br />
      

    </div>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">HOW DID YOU LEARN ABOUT THIS COURSE?</span> </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="width: 300px;"></label>
    <div class="float_left">
      <input value="Internet search engine" title="" class="radio" id="radio70" name="radio7" type="radio" />
      <label for="radio70" class="radio_label">Internet search engine</label>
      <br />
      
<input value="Facebook" title="" class="radio" id="radio71" name="radio7" type="radio" />
      <label for="radio71" class="radio_label">Facebook</label>
      <br />
      
<input value="Kopan/other FPMT centers" title="" class="radio" id="radio72" name="radio7" type="radio" />
      <label for="radio72" class="radio_label">Kopan/other FPMT centers</label>
      <br />
      
<input value="Posters in town" title="" class="radio" id="radio73" name="radio7" type="radio" />
      <label for="radio73" class="radio_label">Posters in town</label>
      <br />
      
<input value="Friends/other travelers" title="" class="radio" id="radio74" name="radio7" type="radio" />
      <label for="radio74" class="radio_label">Friends/other travelers</label>
      <br />
      
<input value="Guide Book" title="" class="radio" id="radio75" name="radio7" type="radio" />
      <label for="radio75" class="radio_label">Guide Book</label>
      <br />
      
<input value="Other" title="" class="radio" id="radio76" name="radio7" type="radio" />
      <label for="radio76" class="radio_label">Other</label>
      <br />
      

    </div>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 300px;">If other, please specify</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_25" name="text_25" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textarea">
    <label class="cf_label" style="width: 300px;">Is there anything else you think we should know?</label>
    <textarea class="cf_inputbox" rows="5" id="text_26" title="" cols="30" name="text_26"></textarea>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_button">
    <input value="Submit" name="button_4" type="submit" /><input type="reset" name="reset" value="Reset"/>
  </div>
  <div class="cfclear"> </div>
</div>


Can anyone help me with what's going wrong? as i can't see it.

Many Thanks!
GreyHead 20 Apr, 2011
Hi schnitz123,

The HTML looks OK; it's probably a JavaScript problem. Please post a link to the form so we can take a quick look.

Bob
GreyHead 20 Apr, 2011
Hi schnitz123 ,

Your template (or some other component) is loading the jQuery JavaScript library. Out of the box jQuery isn't compatible with the MooTools library used by Joomla! and ChronoForms. You can use jQuery with MooTools in no-conflict mode. There are various ways of doing this. The simplest is to add a line of script in the ChronoForms Form JavaScript box:
jQuery.noConflict();
This will free the $ operator which is used by MooTools, so you may need to update your own javascripts to use the longer jQuery operator.

There is also a neat Joomla! system plugin named SC jQuery that allows you to control on which pages jQuery is loaded, and will always load it in no-conflict mode.

Bob

PS If you view the form without the template then the validation is working OK.
schnitz123 20 Apr, 2011
So this is where i show my noobishness😛

So i added:
jQuery.noConflict();
to the Form's javascript box (which otherwise is empty). But it didn't seem to do anything. You can still submit an empty form.

i see that the blank form u posted really does work. just i didn't build the site/form etc. so i have no idea how it was put together etc.

so how do i get it to work like the one you posted.
schnitz123 20 Apr, 2011
Hi,

So i installed SC jQuery, and enabled it, but don't really know where to go from there. still hasn't seemed to make a diff.


cheers
GreyHead 20 Apr, 2011
Hi schnitz123 ,

It looks as though you now have two versions of JQuery loading - version 1.4.2 from the SC plug-in and version 1.2.6 from the template. Try commenting out the line in the template that is loading the second copy.

Bob
schnitz123 21 Apr, 2011
Wooot! Commenting out the 1.2.6 script worked an absolute treat!!
Not only has it sorted the forms on our website, it has fixed a number of other issues!

So i am hugely thankful to you guys, your support has been incredible!🙂
This topic is locked and no more replies can be posted.