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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.