Email validation problem

whmok 02 May, 2009
I'm having a trouble on my form to validate the email entry by the users. Here is my form code:

<div class="form_item">
  <div class="form_element cf_heading">
    <h1 class="cf_text">Post a notice for sale</h1>
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">*Title:</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_1" name="title" type="text" />
  
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Price: (AUD$)</label>
    <input class="cf_inputbox validate-currency-dollar" maxlength="150" size="30" title="" id="text_2" name="price" type="text" />
  
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textarea">
    <label class="cf_label">Description:</label>
    <?php
$editor		=& JFactory::getEditor('jce');
echo $editor->display( 'description',  '' , '80%', '300', '55', '20', false ) ;

?>
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_fileupload">
    <label class="cf_label">Image:</label>
    <input class="cf_fileinput cf_inputbox" title="" size="20" id="file_4" name="file_4" type="file" />
    <a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" src="components/com_chronocontact/css/images/tooltip.png"/></a>
				<div class="tooltipdiv">Image: :: Maximum 1MB, only jpg, gif, and pdf can be uploaded</div>
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Email:</label>
    <input class="cf_inputbox validate-email" maxlength="150" size="30" title="" id="text_1" name="email" type="text" />
  
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Location:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_6" name="location" type="text" />
  
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Suburb:</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_7" name="suburb" type="text" />
  
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_captcha">
    <label class="cf_label">Verification:</label>
    <span>{imageverification}</span> 
    <a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" src="components/com_chronocontact/css/images/tooltip.png"/></a>
				<div class="tooltipdiv">Verification: :: Please enter the text shown in the image at the right hand side of the text box</div>
    </div>
  <div class="clear"> </div>
</div>


<div class="form_item">
  <div class="form_element cf_button">
    <table><tr>
    <td><input type="reset" value="Reset"/></td><td width="150"> </td><td><input value="Preview" type="submit" /></td>
    </tr></table>
  </div>
  <div class="clear"> </div>
</div>


The Required Title field works fine but not the email. I have tried to make another new form with less fields and the validation works. However, this form straightly pass through the email field no matter what is entered. Anyone has idea about this issue? Thanks!
stirfry213 03 May, 2009
I was able to replicate this error. Try taking the colon out of the text so that your code looks like:
<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Email</label>
    <input class="cf_inputbox validate-email" maxlength="150" size="30" title="" id="text_1" name="email" type="text" />
  
  </div>
  <div class="clear"> </div>
</div>

Worked fine for me after I took that out. I don't know why that isn't causing a problem with the title, must have to do with the validation library that CF is using. I also have V3.1 RC4.11. I recommend updating if you don't have the latest version.
whmok 03 May, 2009
I've tried to copy and paste your code into my form but it still doesn't work. The email field is still in yellow color but not happens if you just type in a character and jump to another field. No error comes up.
GreyHead 03 May, 2009
Hi whmok,

Please can you post a link to the form? And which version of ChronoForms/Joomla are you using?

Bob
whmok 03 May, 2009

Hi whmok,

Please can you post a link to the form? And which version of ChronoForms/Joomla are you using?

Bob



Hi Bob,

I'm using Joomla 1.5.10 and ChronoForm V3.1 RC4.11.

I have found out that seems like the the "Price: (AUD$)" field made the validation not working as I have some other forms without this field has no problem on the email validation.

Is there anyway to fix this as the Price field is essential in the form.

PS: I have PM the link and login to you.

Thanks a lot!

Regards,
Victor
Max_admin 03 May, 2009
Hi Victor,

please try with RC5, got some validation issues fixed!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
whmok 04 May, 2009
I have downloaded RC5 and installed it. However once I goes to the form, it comes up a message "LOADING FAILED::CustomCode Class" and the email validation is still not working.
Max_admin 06 May, 2009
Hi, can I test this somewhere ? please show me a link to the form here or in a PM or through the contact page and mention the topic URL please!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.