Adding Telephone in Checkout Address as a Mandatory Field
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Adding Telephone in Checkout Address as a Mandatory Field
I want to add the telephone number as a mandatory field.
What I've done is adding it to billing standard.php
And I've changed the html in address Partial standard as follows
but the phone is displayed in disabled mode. How to achieve that.
What I've done is adding it to billing standard.php
Code: Select all
private $mandatory = array(
'order.base.address.email',
'order.base.address.firstname',
'order.base.address.telephone',
'order.base.address.address1',
'order.base.address.city',
'order.base.address.countryid',
);
Code: Select all
<div class="col <?= ( isset( $css['order.base.address.telephone'] ) ? join( ' ', $css['order.base.address.telephone'] ) : '' ); ?>" data-regex="<?= $testfcn( $regex, 'order.base.address.telephone' ); ?>">
<input type="tel" class="form-control" id="address-<?= $type ?>-telephone<?= $idstr ?>" name="<?= $enc->attr( $this->formparam( array( $fname, 'order.base.address.telephone' ) ) ); ?>"
value="<?= $enc->attr( $testfcn( $addr, 'order.base.address.telephone' ) ); ?>" placeholder="<?= $enc->attr( $this->translate( 'client', 'Telephone' ) ); ?>" <?= $disablefcn( $css, 'order.base.address.telephone' ); ?> >
</div>
Re: Adding Telephone in Checkout Address as a Mandatory Field
You only have to change the configuration and add "order.base.address.telephone" to the mandatory list:
https://aimeos.org/docs/Configuration/C ... /mandatory
You can also change this for the delivery address separately and modify the optional and hidden fields.
https://aimeos.org/docs/Configuration/C ... /mandatory
You can also change this for the delivery address separately and modify the optional and hidden fields.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star