When creating an account PrestaShop 1.7 in its default settings requires the user to enter gender in registration form. We have a choice of two personal titles Mr. and Mrs., and no option to leave this field blank. And here comes the question - how to remove this often unnecessary and unwanted box?
To remove the gender box in the registration form in PrestaShop 1.7 log into your admin panel. In the left menu, in the Configure section choose Shop Parameters and then Customers Settings. On the newly opened page go to the Titles tab.
By default, the panel uploads two options to choose from: Mr. and Mrs. In this part of the panel you can delete or edit both titles. You can also add other, new titles if necessary. To delete the selected title, press the small down arrow next to the edit command. Select delete from the drop-down menu and confirm your selection.
When both values are deleted, the Contact Name box disappears from the registration form.
Adding a new contact name
To add a new field on the form in the upper right corner, select +Add New Social Title.
For the new title, you can add a unique name, assign a gender, and add an image.
The alternative method of removing the Mr. and Mrs. boxes requires changes in the PrestaShop code. In your store directory, find and open the file named classes/form/CustomerFormatter.php. Navigate to the section responsible for the form element related to gender:
Comment out the unnecessary fragment as follows:
After making changes, remember to clear the cache.