[eluser]bigdaddysheikh[/eluser]
Hey Guys,
I am using JS form Validation and a funny thing happens.
When I use CI's tools to create form such as form open/close/textarea/input etc... the form validation does not work. But when I take the output of CI's form creator and paste the hard code into my file the JS validation works.
This is mind boggling. I do not understand what could be causing this discrepency.
CI code:
Code:
<form action="http://localhost:8888/index.php/contact/mail" method="post" class="listForm">
<fieldset>
<legend>Contact</legend>
<ul>
<li><label for="Name">Name:</label> <?=form_input('name');?></li>
<li><label for="E-mail">E-mail:</label> <?=form_input('email');?></li>
<li><label for="Number">Number:</label> <?=form_input('number');?></li>
<li><label for="message">Message:</label> <?=form_textarea('message');?></li>
</ul>
<input type="submit" name="submitbutton" id="submitbutton" value="Submit" /> </fieldset>
<?=form_hidden('refer', $_SERVER['PATH_INFO'])?>
<?=form_close();?>
Hard Form Code
Code:
<form action="http://localhost:8888/index.php/contact/mail" method="post" class="listForm">
<fieldset>
<legend>Contact</legend>
<ul>
<li><label for="Name">Name:</label> <input name="name" type="text" id="name" value="" size="50" maxlength="500" />
</li>
<li><label for="E-mail">E-mail:</label> <input name="email" type="text" id="email" value="" size="50" maxlength="500" />
</li>
<li><label for="Number">Number:</label> <input name="number" type="text" id="number" value="" size="50" maxlength="500" />
</li>
<li><label for="message">Message:</label> <textarea name="message" cols="90" rows="12" id="message" ></textarea>
</li>
</ul>
<input type="submit" name="submitbutton" id="submitbutton" value="Submit" /> </fieldset>
</form>