public function getDeliveryDropdownFields()
    {
        $contact = $this->getContact();

        return FieldList::create(
            CompositeField::create(
                DropdownField::create(
                    'ShippingAddress',
                    _t(
                        'SilverCommerce\Checkout.DeliveryAddress',
                        'Delivery Address'
                    ),
                    $contact->Locations()
                ),
                FormAction::create(
                    'doAddNewShipping',
                    _t(
                        'SilverCommerce\Checkout.UseDifferentAddress',
                        'Use Different Address'
                    )
                )->addextraClass('btn btn-link')
                ->setAttribute('formnovalidate',true)
            )->setName("DeliveryFields")
        );
    }
public function getDeliveryDropdownFields()
    {
        $contact = $this->getContact();

        return FieldList::create(
            CompositeField::create(
                DropdownField::create(
                    'ShippingAddress',
                    _t(
                        'SilverCommerce\Checkout.DeliveryAddress',
                        'Delivery Address'
                    ),
                    $contact->Locations()
                ),
                FormAction::create(
                    'doAddNewShipping',
                    _t(
                        'SilverCommerce\Checkout.UseDifferentAddress',
                        'Use Different Address'
                    )
                )->addextraClass('btn btn-link')
                ->setAttribute('formnovalidate',true)
            )->setName("DeliveryFields")
        );
    }
public function getDeliveryDropdownFields ( ) { $ contact = $ this -> getContact ( ) ; return FieldList :: create ( CompositeField :: create ( DropdownField :: create ( 'ShippingAddress' , _t ( 'SilverCommerce\Checkout.DeliveryAddress' , 'Delivery Address' ) , $ contact -> Locations ( ) ) , FormAction :: create ( 'doAddNewShipping' , _t ( 'SilverCommerce\Checkout.UseDifferentAddress' , 'Use Different Address' ) ) -> addextraClass ( 'btn btn-link' ) -> setAttribute ( 'formnovalidate' , true ) ) -> setName ( "DeliveryFields" ) ) ; }
Generate a FieldList containing fields for if the user
has existing locations

@return FieldList
Generate a FieldList containing fields for if the user has existing locations