Jump to content

How do i edit/change the registration page?


Guest

Recommended Posts

Hi,

Would it be possible to edit the fields on the registration page for new customers? I dont require all of the fields and i need to add some custom ones of my own.

I know you can change the name of the fields, but i need to REMOVE fields

Thanks.

Link to comment
Share on other sites

(Gotta give us a day or two---some of us only check these forums once in a while)

Go to includes/content/profile.inc.php Edit out the sections you don't want. For intance, I have phone and mobile removed so that the first relevant lines are:

if (empty($_POST['firstName']) || empty($_POST['lastName']) || empty($_POST['email']) || empty($_POST['add_1']) || empty($_POST['town']) || empty($county) || empty($_POST['postcode']) || empty($_POST['country'])) {

$errorMsg = $lang['profile']['complete_all'];

} else if (!validateEmail($_POST['email'])) {

$errorMsg = $lang['profile']['email_invalid'];

} else if(isset($emailArray) && $emailArray == true && $emailArray[0]['type'] == 1) {

$errorMsg = $lang['profile']['email_inuse'];

} else {

## update database

$data['firstName'] = $db->mySQLSafe($_POST['firstName']);

$data['lastName'] = $db->mySQLSafe($_POST['lastName']);

$data['email'] = $db->mySQLSafe($_POST['email']);

$data['companyName'] = $db->mySQLSafe($_POST['companyName']);

$data['add_1'] = $db->mySQLSafe($_POST['add_1']);

$data['add_2'] = $db->mySQLSafe($_POST['add_2']);

$data['town'] = $db->mySQLSafe($_POST['town']);

$data['county'] = $db->mySQLSafe($county);

$data['postcode'] = $db->mySQLSafe($_POST['postcode']);

$data['country'] = $db->mySQLSafe($_POST['country']);

You have to remove the same ones you don't want further down the page too, but you get the idea.

Remove the same fields (er, different code, but if you don't want County, remove the relevant lines) here: /includes/content/reg.inc.php

Then, go into skins/(yourskinname)/styleTemplates/content/reg.tpl AND skins/(yourskinname)styleTemplates/content/profile.tpl and do the same. I think that's it. Back up first!! I made all sorts of messes doing this the first time.

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.   Paste as plain text instead

  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.

×
×
  • Create New...