Redo Posted February 16, 2003 Share Posted February 16, 2003 Hi Got an unusual question: how do I remove the requirement for Phone number ? I don't want to entirely remove this field but I don't want to have a validation check, so someone who wants to give the phonenumber can do, someone who does not can continue without having to fill one in.. Any help in this matter is appreciated, I was looking through similar topics here on the board, but they all seem to relate to older versions, I could not find any suitable reference to my case. Version I use is: 2.2 TIA Link to comment Share on other sites More sharing options...
toolcrazy Posted February 16, 2003 Share Posted February 16, 2003 Your going to edit two files. 1. /catalog/create_account_proccess.php comment out this section of code. /* */ is comment tags. about line 149 /*if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) { $error = true; $entry_telephone_error = true; } else { $entry_telephone_error = false; }*/ 2. /catalog/includes/form_check.js.php about line 128 and comment out part of this code. if (document.account_edit.elements['telephone'].type != "hidden") { /*if (telephone == '' || telephone.length < <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_TELEPHONE; ?>"; error = 1;*/ } } I alway comment out things, I don't like to delete, I may want to go back and redo it later. I'm sorry if I have a different snap than yours if this don't work. It works fine in mine. You will also have to edit out the word required too. Steve ------------------------- Link to comment Share on other sites More sharing options...
toolcrazy Posted February 16, 2003 Share Posted February 16, 2003 To get rid of the "Required" find /catalog/includes/modules/account_details.php and about line 326 find: echo tep_draw_input_field('telephone', $account['customers_telephone']) /*. ' ' . ENTRY_TELEPHONE_NUMBER_TEXT*/; Notice where my comments tags are. /* */ Be carfull with your editing getting on the wrong side of something can cause errors. Steve ------------------------- Link to comment Share on other sites More sharing options...
Redo Posted February 16, 2003 Author Share Posted February 16, 2003 Thanks, I really appreciate it :D Link to comment Share on other sites More sharing options...
eredman Posted March 9, 2003 Share Posted March 9, 2003 To get rid of the "Required" find /catalog/includes/modules/account_details.php and about line 326 find: echo tep_draw_input_field('telephone', $account['customers_telephone']) /*. ' ' . ENTRY_TELEPHONE_NUMBER_TEXT*/; Notice where my comments tags are. /* */ Be carfull with your editing getting on the wrong side of something can cause errors. This wasn't to me but I wanted to thank you as I had been looking for this every since I updated to MS1 Link to comment Share on other sites More sharing options...
toolcrazy Posted March 9, 2003 Share Posted March 9, 2003 You are welcome, glad to help. Steve ------------------------- Link to comment Share on other sites More sharing options...
a.niedermann Posted March 10, 2003 Share Posted March 10, 2003 hello there... I'm quite new in php, so i tried to modify my code like your example with the phonenumber but it doesn't work. i would like to remove the state and the suburb fields totally, and i would like to modify the date_of_birth field to a non required field!!!! Thanks a lot for your help Andreas! Link to comment Share on other sites More sharing options...
toolcrazy Posted March 10, 2003 Share Posted March 10, 2003 hello there... I'm quite new in php, so i tried to modify my code like your example with the phonenumber but it doesn't work. i would like to remove the state and the suburb fields totally, and i would like to modify the date_of_birth field to a non required field!!!! Thanks a lot for your help Andreas! Why State? But all of the ones you listed above can be removed in Admin. And as far as the code I've posted it is right. I've tested on my snap, which is Dec 5th and on MS1. You must of done something wrong. And you can adapt the above code to change birthdate to be not required. I will look at the code and list it in a day or so. Steve ------------------------- Link to comment Share on other sites More sharing options...
requiem_shark Posted March 10, 2003 Share Posted March 10, 2003 Good post. For my next install - gender begone! It's funny how the harder I work the luckier I get. Link to comment Share on other sites More sharing options...
toolcrazy Posted March 11, 2003 Share Posted March 11, 2003 Good post. For my next install - gender begone! You can remove gender either in aplication_top.php and change a true to false or it can be done in Admin in the later snaps. Steve ------------------------- Link to comment Share on other sites More sharing options...
a.niedermann Posted March 11, 2003 Share Posted March 11, 2003 Hey Steve You're right, I can remove this fields in the admin section. Now only the date_of_birth field in required.....It would be nice if you could post the code to change the date_of_birth in non required... thanks a lot andreas Link to comment Share on other sites More sharing options...
toolcrazy Posted March 11, 2003 Share Posted March 11, 2003 Bear with me, I have to do this at home. I can't devote the time at work. I will do this for you, but you'll have to give me some time Steve ------------------------- Link to comment Share on other sites More sharing options...
a.niedermann Posted March 11, 2003 Share Posted March 11, 2003 I'm sorry steve, I also have time..... that was because of my bad english..... andreas Link to comment Share on other sites More sharing options...
toolcrazy Posted March 12, 2003 Share Posted March 12, 2003 I've been working on it, but I am having problems with the logic. I can get rid of the requirement, but then when you do add the phone number. It doesn't add it to the database. I'll keep working on it. Steve ------------------------- Link to comment Share on other sites More sharing options...
Guest Posted May 20, 2003 Share Posted May 20, 2003 I removed the DOB field altogether and removed the requirement for the telephone #, but I would like this to be shown on my customers' info as well. I want to edit customers.php so that the DOB field no longer appears and the requirement for the phone # does not appear either. I tried to edit one of my customer's account info, but received an error message since customers.php still requires these fields Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.