How to set Customer Email / Confirm Email Field readonly

GermanHero

New Member
Hello!

i want to set the Email and Confirm Email Fields readonly at
https:/xxx.com/customer/index.php/account/index

but i somehow cannot find where to do this in the source
i thought in apps/backend/views/customers/form-php
but how to set the fields to readonly ?
 

twisted1919

Administrator
Staff member
So you have:
PHP:
<div class="row">
    <div class="col-lg-6">
        <div class="form-group">
            <?php echo $form->labelEx($customer, 'email');?>
            <?php echo $form->emailField($customer, 'email', $customer->getHtmlOptions('email')); ?>
            <?php echo $form->error($customer, 'email');?>
        </div>
    </div>
    <div class="col-lg-6">
        <div class="form-group">
            <?php echo $form->labelEx($customer, 'confirm_email');?>
            <?php echo $form->emailField($customer, 'confirm_email', $customer->getHtmlOptions('confirm_email')); ?>
            <?php echo $form->error($customer, 'confirm_email');?>
        </div>
    </div>
</div>
To make them read only, do:
PHP:
<div class="row">
    <div class="col-lg-6">
        <div class="form-group">
            <?php echo $form->labelEx($customer, 'email');?>
            <?php echo $form->emailField($customer, 'email', $customer->getHtmlOptions('email', array('readonly' => 'readonly'))); ?>
            <?php echo $form->error($customer, 'email');?>
        </div>
    </div>
    <div class="col-lg-6">
        <div class="form-group">
            <?php echo $form->labelEx($customer, 'confirm_email');?>
            <?php echo $form->emailField($customer, 'confirm_email', $customer->getHtmlOptions('confirm_email', array('readonly' => 'readonly'))); ?>
            <?php echo $form->error($customer, 'confirm_email');?>
        </div>
    </div>
</div>
 

GermanHero

New Member
Thank you for your answer but somehow after i edited the
/apps/backend/views/customers/forms.php

it sill is editable when i click on a customers profile

best regards
 
Top