Hello.
I need to have the fields 'firstname' and 'lastname' as readonly in the "personal information" page of the front store. But I also need the client to fill them in the "Create an account" page of the front store. We have succeeded in version 1.7.1.2 but we are not able in version 1.7.5.1.
Can any one help please?
In version 1.7.1.2, we modifying the 'themes/classic/templates/_partials/form-fields.tpl' with these modifications:
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{** NZ START *}
{if $field.name === 'id_customer'}
{assign var="cust_id" value={$field.value} scope="root"}
{/if}
{* NZ END *}
{if $field.type == 'hidden'}
{block name='form_field_item_hidden'}
<input type="hidden" name="{$field.name}" value="{$field.value}">
{/block}
{else}
...
{block name='form_field_item_other'}
<input
class="form-control"
name="{$field.name}"
type="{$field.type}"
value="{$field.value}"
{** NZ START *}
{if !empty($cust_id)}
{if $field.name === 'firstname'}readonly{/if}
{if $field.name === 'lastname'}readonly{/if}
{/if}
{** NZ END *}
{if isset($field.availableValues.placeholder)}placeholder="{$field.availableValues.placeholder}"{/if}
{if $field.maxLength}maxlength="{$field.maxLength}"{/if}
{if $field.required}required{/if}
Thanks,
Alain Martel
.png.022b5452a8f28f552bc9430097a16da2.png)