Jump to content

Registration javascript


mark1million

Recommended Posts

I think what you are looking for is in the core/modules/Registration/Registration.php file under the function of

VerifyData()

as you can see, as an example, if you specify nothing for your first name, it will throw back an error

if($this->post->firstname == '') {
$error = true;
$this->set('firstname_error', true);
} else {
$this->set('firstname_error', '');
}

And as you can see in the ProcessRegistration function, if it sees an error in the VerifyData function, it will throw the template back with an error, otherwise it will continue

// Yes, there was an error
if(!$this->VerifyData()) {
$this->ShowForm();
	 return;
 }

And if you are looking to edit the error message itself, you can look in the registration_mainform.tpl/.php

like this

<?php
if($firstname_error == true)
echo '<p class="error">Please enter your first name</p>';
?>

Link to comment
Share on other sites

  • Moderators

Lol damn right under my nose. Just couldn't find it for looking lol.

I'm fed up of users registering with blank fields for dob and vatsim so I have updated the registration form and the database to move away from custom fields so I can enforce validation.

All works fine apart from the validation.

Thanks again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...