Jump to content
radhouanee

remove field of customer form Back-End

Recommended Posts

Hello guys,

please where can i find the fil of customer form ? i need to remove birthdate and other fields from the form

please help me

Have a good day ^^

presta.jpg

Share this post


Link to post
Share on other sites

if you want to remove required fields, you have to override classes/Customers.php and controllers/AdminCustomersController.php files (mainly renderForm function) by the analogic way as is described in http:// http://nemops.com/new-customer-address-fields-prestashop/

if you want to remove only optional fields, you can simply hide them in the form:

in your module yourModuleName.php:
into install() function add line:
 

if !$this->registerHook('displayAdminCustomersForm')
  return false;

and add function

 public function hookdisplayAdminCustomersForm($params)
    {
        return $this->display(__FILE__, 'views/templates/admin/admincustomersform.tpl');
    }


and create views/templates/admin/admincustomersform.tpl file
 

<script type="text/javascript">

      window.addEventListener("load", function(evt) {
      // hide	"Birthday"
          $("select[name='days']").parent().parent().parent().parent().css('display','none');
      // hide	"Partner offers"
          $("input[name='optin']").parent().parent().parent().css('display','none');
      })


</script>

that's all

Share this post


Link to post
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.
Note: Your post will require moderator approval before it will be visible.

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.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More