sphinx Posted October 5, 2011 Share Posted October 5, 2011 Hi there, At present i'm using this to check for blank fields: <script language="JavaScript"> var frmvalidator = new Validator("contact_form"); frmvalidator.EnableOnPageErrorDisplaySingleBox(); frmvalidator.EnableMsgsTogether(); frmvalidator.addValidation("name","req","You have not entered a name."); frmvalidator.addValidation("email","req","You must supply an email address."); frmvalidator.addValidation("message","req","You have not entered a message."); frmvalidator.addValidation("email","email","That email address you have supplied is not valid."); frmvalidator.addValidation("sixletterscode","req","Please enter the four characters into the specified box."); </script> which relates too: <form method="POST" name="contact_form" action="/?captcha_fail"> At present, that puts the errors in one block like: You have not entered a name. You must supply an email address. You have not entered a message. Please enter the four characters into the specified box. And is displayed by: <div id='contact_form_errorloc' class='err'></div> Basically, I want to seperate the prompts under each field instead of all clumped together. Many thanks Link to comment https://forums.phpfreaks.com/topic/248493-seperating-the-javascript-empty-field-alerts/ Share on other sites More sharing options...
sphinx Posted October 6, 2011 Author Share Posted October 6, 2011 bump Link to comment https://forums.phpfreaks.com/topic/248493-seperating-the-javascript-empty-field-alerts/#findComment-1276576 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.