Jump to content

Possible to hardcode placeholder text in customer creation form (Backoffice) ?


USB83

Recommended Posts

Hello,

I sometimes need to add customers through the backoffice (PS 1.7.7.7 ), and i'm looking for a way to hardcode some text in some fields (the last name for instance)

The code can be found in :

/PrestaShopBundle/Resources/views/Admin/Sell/Customer/Blocks/form.html.twig

Code looks like this :

{{ ps.form_group_row(customerForm.last_name, {}, {
            'label': 'Last name'|trans({}, 'Admin.Global'),
            'help': 'Only letters and the dot (.) character, followed by a space, are allowed.'|trans({}, 'Admin.Orderscustomers.Help')
}) }}

it outputs this :

<div class="form-group row type-text ">
<label for="customer_last_name" class="form-control-label ">
      <span class="text-danger">*</span>Last name</label>
    
<div class="col-sm">
  <input type="text" id="customer_last_name" name="customer[last_name]" required="required" class="form-control">
      <small class="form-text">Only letters and the dot (.) character, followed by a space, are allowed.</small></div></div>

 

Thanks a lot

 

 

 

customer-form-2021-09_30.png

Edited by USB83
different screenshot (see edit history)
Link to comment
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
×
×
  • Create New...