Hi all, I've been working on improving the customer experience and use a plugin for form validation with jquery and jquery mobile, this plugin is as follows:
I hope this code is helpful to those seeking an effective solution while nice, if you haveany questions like I'll help:)
The code is as follows:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/jquery.mobile-1.0a2.css" />
<link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="utf-8" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/jquery.mobile-1.0a2.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script src="js/jquery.validationEngine-en.js" type="text/javascript"></script>
<script src="js/jquery.validationEngine.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
$("#formID").validationEngine({
failure : function() {}
})
});
</script>
</head>
<body>
<!-- Inicio Segunda Pagina -->
<div data-role="page" id="validacion">
<div data-role="header">
<h1>Formulario</h1>
</div>
<form id="formID" name="formID" method="get" data-theme="b" action="">
<div data-role="fieldcontain">
<label for="cname">Nombre:</label>
<input type="text" id="cname" name="name" class="validate[required,custom[noSpecialCaracters],length[0,20]] text-input" />
</div>
<div data-role="fieldcontain">
<label for="cemail">E-Mail:</label>
<input type="text" id="cemail" name="email" class="validate[required,custom[email]] text-input" />
</div>
<div data-role="fieldcontain">
<label for="curl">URL:</label>
<input type="text" id="curl" name="url" class="url" value="" />
</div>
<div data-role="fieldcontain">
<label for="ccomment">Direccion:</label>
<input type="text" id="ccoment" name="comment" class="required" />
</div>
<div data-inline="true">
<input class="submit" type="submit" value="Submit"/>
</div>
</form>
</div>
<div data-role="footer">
<h4>© 2010 Openidea</h4>
</div>
</body>
</html>
I tested ipad and iphone and if I can prove it in any other platform I appreciate yourcomments.
Greetings and Blessings.
Atte.