Jump to content
Sign in to follow this  
balkp814

Can I make only email required during signup?

Recommended Posts

Hi, I looked through the demo and once signing up it requires your address, zipcode, phone number..and a bunch of other info. I am not using WHMCS for hosting so all I require is an email and maybe a secondary email. Is there anyway to take these out or would this have to be customized? Thanks.

Share this post


Link to post
Share on other sites

This would require a bit of template customization but i believe it can be done without much hassle.

 

Start by editing the files for the checkout process, so the fields are hidden instead of text and pre-filled with N/A or similar. Then you could remove the address variables from the client area templates and invoice templates, so the 'N/A' isn't being showed to the customer. Finally you would need to change any email template that contains the address variables too.

 

I might have forgotten something, but i think it should work out that way.

Share this post


Link to post
Share on other sites
This would require a bit of template customization but i believe it can be done without much hassle.

 

Start by editing the files for the checkout process, so the fields are hidden instead of text and pre-filled with N/A or similar. Then you could remove the address variables from the client area templates and invoice templates, so the 'N/A' isn't being showed to the customer. Finally you would need to change any email template that contains the address variables too.

I might have forgotten something, but i think it should work out that way.

 

Thanks for the reply, I don't know much about coding, but if there is a tutorial or guide I can follow that. It makes sense, I will look up some guides and take a wack at it. I have the original file so its ok if I mess up. I have emailed whmcs for a quote on this so if that price is affordable I will just let them do it. Thing is I need it done soon, so I am trying to figure it out now.

Edited by balkp814

Share this post


Link to post
Share on other sites

<tr><td class="fieldarea">{$LANG.clientareaemail}</td><td><input type="text" name="email" size=50 value="{$clientemail}"></td></tr>

 

<tr><td class="fieldarea">{$LANG.clientareaaddress1}</td><td><input type="text" name="address1" size=40 value="{$clientaddress1}"></td></tr>

 

Those are two examples of the coding, what would happen if I just delete it alltogether?

Share this post


Link to post
Share on other sites

If you delete the lines, WHMCS will complain that the customer haven't filled out the required values. Instead, replace all type="text" with type="hidden" for the fields you do not wish to show, and make sure they have a value="N/A". You may also want to remove the table row that contains the input fields and descriptions, so the signup page looks normal.

Share this post


Link to post
Share on other sites
If you delete the lines, WHMCS will complain that the customer haven't filled out the required values. Instead, replace all type="text" with type="hidden" for the fields you do not wish to show, and make sure they have a value="N/A". You may also want to remove the table row that contains the input fields and descriptions, so the signup page looks normal.

 

EDIT: I just deleted the whole line and its still showing up, I don't think its the clientregister.tpl, maybe register.php but I believe that is encrypted and you are not supposed to access it. Just checked the page I am trying to edit is showing up as whmcs/register.php so I guess I will have to go through whmcs.

 

Thanks for the info, I won't delete them.

 

r><td class="fieldarea">{$LANG.clientareapostcode}</td><td><input type="hidden" name="postcode" size=10 value="N/A"></td></tr>

 

r><td class="fieldarea">{$LANG.clientareapostcode}</td><td><input type="hidden" name="postcode" size=10 value="{N/A}"></td></tr>

 

Thanks, I tried both of these and its still showing up. The difference is N/A and {N/A}

 

Edit: These are the tags before and after the lines I am editing, is this the table? There are no other lines of coding for these input fields. I am editing

clientregister.tpl

 

<table cellspacing="1" cellpadding="0" class="frame"><tr><td>

<table width="100%" cellpadding="2">

<tr><td width="150" class="fieldarea">{$LANG.clientareafirstname}</td><td><input type="text" name="firstname" size=30 value="{$clientfirstname}"></td></tr>

...

...

...

<tr><td class="fieldarea">{$LANG.clientareaphonenumber}</td><td><input type="text" name="phonenumber" size="20" value="{$clientphonenumber}"></td></tr>

</table>

</td></tr></table>

Edited by balkp814

Share this post


Link to post
Share on other sites

Does the input boxes show up? If they do, then you're editing the wrong template or you're viewing a cached copy. To fix the latter, remove the content of templates_c inside your WHMCS installation directory and refresh your browser.

 

If it's only the text description being showed, then it's because you need to remove the table rows/cells for each field you do not want (<tr> and <td> tags), but while keeping the <input> tags.

Share this post


Link to post
Share on other sites

Hey, yea it worked but it disabled it only when I used the default template. I want to use the"Portal" template, so I think I have to change the one in that directory. Thanks for the help.

Share this post


Link to post
Share on other sites

Yes, each template has it's own directory, located in the templates directory in your WHMCS root directory.

Share this post


Link to post
Share on other sites
Yes, each template has it's own directory, located in the templates directory in your WHMCS root directory.

 

Yes, I did as you said and all the fields are empty now without boxes, like below. I am trying to remove them all together now. The problem is that I am still getting the errors for phone number and zipcode, also below. Interestingly it is now showing me an error for address. Sorry about all the questions, I have never coded before.

 

Email: "textbox"

Address: no textbox just empty

 

 

# Your postcode can only contain letters, numbers and spaces

# Your phone number is not valid

Share this post


Link to post
Share on other sites

It's because WHMCS doesn't allow N/A to be used as phone number or zip code. Replace value="N/A" with value="1234" and it should work out (not sure if phone number requires more than 4 numbers, give it a try :)).

Share this post


Link to post
Share on other sites
It's because WHMCS doesn't allow N/A to be used as phone number or zip code. Replace value="N/A" with value="1234" and it should work out (not sure if phone number requires more than 4 numbers, give it a try :)).

 

Yea I will try it out right now, thanks for all your help you have no idea how much I appreciate it :D

 

Also,do you know how I can remove these completely from the field. Right now the Address: Is still showing up.

Edited by balkp814

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines