How to display field “VAT Number” during registrationMagento 2: Error during VAT Number verificationMagento 2 Rest api to create order not adding shipping addressShow Telephone and Company on Registration form in magento1.9 after showing get validation errors?How to change field order in checkout and change label nameshow to display the address fields in the registration formForm is not displayed on panel admin Magento 2How to display field “Tax number” during registrationMagento2 Customer Registration during checkoutDisplay custom drop down in registration page using Magento2.1Newsletter subscription problem during registration in magento2

Closed-form expression for certain product

Why is so much work done on numerical verification of the Riemann Hypothesis?

What does routing an IP address mean?

Is it possible to have a strip of cold climate in the middle of a planet?

Did arcade monitors have same pixel aspect ratio as TV sets?

Does a 'pending' US visa application constitute a denial?

What are the purposes of autoencoders?

Is it improper etiquette to ask your opponent what his/her rating is before the game?

Added a new user on Ubuntu, set password not working?

How do I color the graph in datavisualization?

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

What should you do if you miss a job interview (deliberately)?

What percentage of fillings performed today are done with mercury amalgam?

Lowest total scrabble score

copy and scale one figure (wheel)

Store Credit Card Information in Password Manager?

Creepy dinosaur pc game identification

If a character has darkvision, can they see through an area of nonmagical darkness filled with lightly obscuring gas?

How can I block email signup overlays or javascript popups in Safari?

A social experiment. What is the worst that can happen?

Fear of getting stuck on one programming language / technology that is not used in my country

lightning-datatable row number error

Terse Method to Swap Lowest for Highest?

What was this official D&D 3.5e Lovecraft-flavored rulebook?



How to display field “VAT Number” during registration


Magento 2: Error during VAT Number verificationMagento 2 Rest api to create order not adding shipping addressShow Telephone and Company on Registration form in magento1.9 after showing get validation errors?How to change field order in checkout and change label nameshow to display the address fields in the registration formForm is not displayed on panel admin Magento 2How to display field “Tax number” during registrationMagento2 Customer Registration during checkoutDisplay custom drop down in registration page using Magento2.1Newsletter subscription problem during registration in magento2













0















How to display field "VAT Number" (required) during registration.



This field is visible when editing the user from the administration panel. Only how to display them during registration?
enter image description here



I found code in:




app/design/frontend/YOUR_PACKAGE/YOUR_THEME/Magento_Customer/templates/form/register.phtml




This file contains fields that are displayed during registration:



 <input type="hidden" name="create_address" value="1" />
<div class="field company">
<label for="company" class="label"><span><?php /* @escapeNotVerified */ echo __('Company') ?></span></label>
<div class="control">
<input type="text" name="company" id="company" value="<?php echo $block->escapeHtml($block->getFormData()->getCompany()) ?>" title="<?php /* @escapeNotVerified */ echo __('Company') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('company') ?>">
</div>
</div>
<div class="field telephone">
<label for="telephone" class="label"><span><?php /* @escapeNotVerified */ echo __('Phone Number') ?></span></label>
<div class="control">
<input type="text" name="telephone" id="telephone" value="<?php echo $block->escapeHtml($block->getFormData()->getTelephone()) ?>" title="<?php /* @escapeNotVerified */ echo __('Phone Number') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('telephone') ?>">
</div>
</div>

<?php $_streetValidationClass = $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('street'); ?>

<div class="field street required">
<label for="street_1" class="label"><span><?php /* @escapeNotVerified */ echo __('Street Address') ?></span></label>
<div class="control">
<input type="text" name="street[]" value="<?php echo $block->escapeHtml($block->getFormData()->getStreet(0)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address') ?>" id="street_1" class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
<div class="nested">
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
<?php for ($_i = 2, $_n = $this->helper('MagentoCustomerHelperAddress')->getStreetLines(); $_i <= $_n; $_i++): ?>
<div class="field additional">
<label class="label" for="street_<?php /* @escapeNotVerified */ echo $_i ?>">
<span><?php /* @escapeNotVerified */ echo __('Address') ?></span>
</label>
<div class="control">
<input type="text" name="street[]" value="<?php echo $block->escapeHtml($block->getFormData()->getStreetLine($_i - 1)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address %1', $_i) ?>" id="street_<?php /* @escapeNotVerified */ echo $_i ?>" class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
</div>
</div>
<?php endfor; ?>
</div>
</div>
</div>

<div class="field required">
<label for="city" class="label"><span><?php /* @escapeNotVerified */ echo __('City') ?></span></label>
<div class="control">
<input type="text" name="city" value="<?php echo $block->escapeHtml($block->getFormData()->getCity()) ?>" title="<?php /* @escapeNotVerified */ echo __('City') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('city') ?>" id="city">
</div>
</div>

<div class="field region required">
<label for="region_id" class="label"><span><?php /* @escapeNotVerified */ echo __('State/Province') ?></span></label>
<div class="control">
<select id="region_id" name="region_id" title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>" class="validate-select" style="display:none;">
<option value=""><?php /* @escapeNotVerified */ echo __('Please select a region, state or province.') ?></option>
</select>
<input type="text" id="region" name="region" value="<?php echo $block->escapeHtml($block->getRegion()) ?>" title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('region') ?>" style="display:none;">
</div>
</div>

<div class="field zip required">
<label for="zip" class="label"><span><?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?></span></label>
<div class="control">
<input type="text" name="postcode" value="<?php echo $block->escapeHtml($block->getFormData()->getPostcode()) ?>" title="<?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('postcode') ?>">
</div>
</div>

<div class="field country required">
<label for="country" class="label"><span><?php /* @escapeNotVerified */ echo __('Country') ?></span></label>
<div class="control">
<?php echo $block->getCountryHtmlSelect() ?>
</div>
</div>
<?php $addressAttributes = $block->getChildBlock('customer_form_address_user_attributes');?>
<?php if ($addressAttributes): ?>
<?php $addressAttributes->setEntityType('customer_address'); ?>
<?php $addressAttributes->setFieldIdFormat('address:%1$s')->setFieldNameFormat('address[%1$s]');?>
<?php $block->restoreSessionData($addressAttributes->getMetadataForm(), 'address');?>
<?php echo $addressAttributes->setShowContainer(false)->toHtml()?>
<?php endif;?>
<input type="hidden" name="default_billing" value="1">
<input type="hidden" name="default_shipping" value="1">
</fieldset>


I also found this code in this file:



<?php $_taxvat = $block->getLayout()->createBlock('MagentoCustomerBlockWidgetTaxvat') ?>
<?php if ($_taxvat->isEnabled()): ?>
<?php echo $_taxvat->setTaxvat($block->getFormData()->getTaxvat())->toHtml() ?>
<<?php endif ?>









share|improve this question
















bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.



















    0















    How to display field "VAT Number" (required) during registration.



    This field is visible when editing the user from the administration panel. Only how to display them during registration?
    enter image description here



    I found code in:




    app/design/frontend/YOUR_PACKAGE/YOUR_THEME/Magento_Customer/templates/form/register.phtml




    This file contains fields that are displayed during registration:



     <input type="hidden" name="create_address" value="1" />
    <div class="field company">
    <label for="company" class="label"><span><?php /* @escapeNotVerified */ echo __('Company') ?></span></label>
    <div class="control">
    <input type="text" name="company" id="company" value="<?php echo $block->escapeHtml($block->getFormData()->getCompany()) ?>" title="<?php /* @escapeNotVerified */ echo __('Company') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('company') ?>">
    </div>
    </div>
    <div class="field telephone">
    <label for="telephone" class="label"><span><?php /* @escapeNotVerified */ echo __('Phone Number') ?></span></label>
    <div class="control">
    <input type="text" name="telephone" id="telephone" value="<?php echo $block->escapeHtml($block->getFormData()->getTelephone()) ?>" title="<?php /* @escapeNotVerified */ echo __('Phone Number') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('telephone') ?>">
    </div>
    </div>

    <?php $_streetValidationClass = $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('street'); ?>

    <div class="field street required">
    <label for="street_1" class="label"><span><?php /* @escapeNotVerified */ echo __('Street Address') ?></span></label>
    <div class="control">
    <input type="text" name="street[]" value="<?php echo $block->escapeHtml($block->getFormData()->getStreet(0)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address') ?>" id="street_1" class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
    <div class="nested">
    <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
    <?php for ($_i = 2, $_n = $this->helper('MagentoCustomerHelperAddress')->getStreetLines(); $_i <= $_n; $_i++): ?>
    <div class="field additional">
    <label class="label" for="street_<?php /* @escapeNotVerified */ echo $_i ?>">
    <span><?php /* @escapeNotVerified */ echo __('Address') ?></span>
    </label>
    <div class="control">
    <input type="text" name="street[]" value="<?php echo $block->escapeHtml($block->getFormData()->getStreetLine($_i - 1)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address %1', $_i) ?>" id="street_<?php /* @escapeNotVerified */ echo $_i ?>" class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
    </div>
    </div>
    <?php endfor; ?>
    </div>
    </div>
    </div>

    <div class="field required">
    <label for="city" class="label"><span><?php /* @escapeNotVerified */ echo __('City') ?></span></label>
    <div class="control">
    <input type="text" name="city" value="<?php echo $block->escapeHtml($block->getFormData()->getCity()) ?>" title="<?php /* @escapeNotVerified */ echo __('City') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('city') ?>" id="city">
    </div>
    </div>

    <div class="field region required">
    <label for="region_id" class="label"><span><?php /* @escapeNotVerified */ echo __('State/Province') ?></span></label>
    <div class="control">
    <select id="region_id" name="region_id" title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>" class="validate-select" style="display:none;">
    <option value=""><?php /* @escapeNotVerified */ echo __('Please select a region, state or province.') ?></option>
    </select>
    <input type="text" id="region" name="region" value="<?php echo $block->escapeHtml($block->getRegion()) ?>" title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('region') ?>" style="display:none;">
    </div>
    </div>

    <div class="field zip required">
    <label for="zip" class="label"><span><?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?></span></label>
    <div class="control">
    <input type="text" name="postcode" value="<?php echo $block->escapeHtml($block->getFormData()->getPostcode()) ?>" title="<?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('postcode') ?>">
    </div>
    </div>

    <div class="field country required">
    <label for="country" class="label"><span><?php /* @escapeNotVerified */ echo __('Country') ?></span></label>
    <div class="control">
    <?php echo $block->getCountryHtmlSelect() ?>
    </div>
    </div>
    <?php $addressAttributes = $block->getChildBlock('customer_form_address_user_attributes');?>
    <?php if ($addressAttributes): ?>
    <?php $addressAttributes->setEntityType('customer_address'); ?>
    <?php $addressAttributes->setFieldIdFormat('address:%1$s')->setFieldNameFormat('address[%1$s]');?>
    <?php $block->restoreSessionData($addressAttributes->getMetadataForm(), 'address');?>
    <?php echo $addressAttributes->setShowContainer(false)->toHtml()?>
    <?php endif;?>
    <input type="hidden" name="default_billing" value="1">
    <input type="hidden" name="default_shipping" value="1">
    </fieldset>


    I also found this code in this file:



    <?php $_taxvat = $block->getLayout()->createBlock('MagentoCustomerBlockWidgetTaxvat') ?>
    <?php if ($_taxvat->isEnabled()): ?>
    <?php echo $_taxvat->setTaxvat($block->getFormData()->getTaxvat())->toHtml() ?>
    <<?php endif ?>









    share|improve this question
















    bumped to the homepage by Community 11 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















      0












      0








      0








      How to display field "VAT Number" (required) during registration.



      This field is visible when editing the user from the administration panel. Only how to display them during registration?
      enter image description here



      I found code in:




      app/design/frontend/YOUR_PACKAGE/YOUR_THEME/Magento_Customer/templates/form/register.phtml




      This file contains fields that are displayed during registration:



       <input type="hidden" name="create_address" value="1" />
      <div class="field company">
      <label for="company" class="label"><span><?php /* @escapeNotVerified */ echo __('Company') ?></span></label>
      <div class="control">
      <input type="text" name="company" id="company" value="<?php echo $block->escapeHtml($block->getFormData()->getCompany()) ?>" title="<?php /* @escapeNotVerified */ echo __('Company') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('company') ?>">
      </div>
      </div>
      <div class="field telephone">
      <label for="telephone" class="label"><span><?php /* @escapeNotVerified */ echo __('Phone Number') ?></span></label>
      <div class="control">
      <input type="text" name="telephone" id="telephone" value="<?php echo $block->escapeHtml($block->getFormData()->getTelephone()) ?>" title="<?php /* @escapeNotVerified */ echo __('Phone Number') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('telephone') ?>">
      </div>
      </div>

      <?php $_streetValidationClass = $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('street'); ?>

      <div class="field street required">
      <label for="street_1" class="label"><span><?php /* @escapeNotVerified */ echo __('Street Address') ?></span></label>
      <div class="control">
      <input type="text" name="street[]" value="<?php echo $block->escapeHtml($block->getFormData()->getStreet(0)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address') ?>" id="street_1" class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
      <div class="nested">
      <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
      <?php for ($_i = 2, $_n = $this->helper('MagentoCustomerHelperAddress')->getStreetLines(); $_i <= $_n; $_i++): ?>
      <div class="field additional">
      <label class="label" for="street_<?php /* @escapeNotVerified */ echo $_i ?>">
      <span><?php /* @escapeNotVerified */ echo __('Address') ?></span>
      </label>
      <div class="control">
      <input type="text" name="street[]" value="<?php echo $block->escapeHtml($block->getFormData()->getStreetLine($_i - 1)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address %1', $_i) ?>" id="street_<?php /* @escapeNotVerified */ echo $_i ?>" class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
      </div>
      </div>
      <?php endfor; ?>
      </div>
      </div>
      </div>

      <div class="field required">
      <label for="city" class="label"><span><?php /* @escapeNotVerified */ echo __('City') ?></span></label>
      <div class="control">
      <input type="text" name="city" value="<?php echo $block->escapeHtml($block->getFormData()->getCity()) ?>" title="<?php /* @escapeNotVerified */ echo __('City') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('city') ?>" id="city">
      </div>
      </div>

      <div class="field region required">
      <label for="region_id" class="label"><span><?php /* @escapeNotVerified */ echo __('State/Province') ?></span></label>
      <div class="control">
      <select id="region_id" name="region_id" title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>" class="validate-select" style="display:none;">
      <option value=""><?php /* @escapeNotVerified */ echo __('Please select a region, state or province.') ?></option>
      </select>
      <input type="text" id="region" name="region" value="<?php echo $block->escapeHtml($block->getRegion()) ?>" title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('region') ?>" style="display:none;">
      </div>
      </div>

      <div class="field zip required">
      <label for="zip" class="label"><span><?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?></span></label>
      <div class="control">
      <input type="text" name="postcode" value="<?php echo $block->escapeHtml($block->getFormData()->getPostcode()) ?>" title="<?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('postcode') ?>">
      </div>
      </div>

      <div class="field country required">
      <label for="country" class="label"><span><?php /* @escapeNotVerified */ echo __('Country') ?></span></label>
      <div class="control">
      <?php echo $block->getCountryHtmlSelect() ?>
      </div>
      </div>
      <?php $addressAttributes = $block->getChildBlock('customer_form_address_user_attributes');?>
      <?php if ($addressAttributes): ?>
      <?php $addressAttributes->setEntityType('customer_address'); ?>
      <?php $addressAttributes->setFieldIdFormat('address:%1$s')->setFieldNameFormat('address[%1$s]');?>
      <?php $block->restoreSessionData($addressAttributes->getMetadataForm(), 'address');?>
      <?php echo $addressAttributes->setShowContainer(false)->toHtml()?>
      <?php endif;?>
      <input type="hidden" name="default_billing" value="1">
      <input type="hidden" name="default_shipping" value="1">
      </fieldset>


      I also found this code in this file:



      <?php $_taxvat = $block->getLayout()->createBlock('MagentoCustomerBlockWidgetTaxvat') ?>
      <?php if ($_taxvat->isEnabled()): ?>
      <?php echo $_taxvat->setTaxvat($block->getFormData()->getTaxvat())->toHtml() ?>
      <<?php endif ?>









      share|improve this question
















      How to display field "VAT Number" (required) during registration.



      This field is visible when editing the user from the administration panel. Only how to display them during registration?
      enter image description here



      I found code in:




      app/design/frontend/YOUR_PACKAGE/YOUR_THEME/Magento_Customer/templates/form/register.phtml




      This file contains fields that are displayed during registration:



       <input type="hidden" name="create_address" value="1" />
      <div class="field company">
      <label for="company" class="label"><span><?php /* @escapeNotVerified */ echo __('Company') ?></span></label>
      <div class="control">
      <input type="text" name="company" id="company" value="<?php echo $block->escapeHtml($block->getFormData()->getCompany()) ?>" title="<?php /* @escapeNotVerified */ echo __('Company') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('company') ?>">
      </div>
      </div>
      <div class="field telephone">
      <label for="telephone" class="label"><span><?php /* @escapeNotVerified */ echo __('Phone Number') ?></span></label>
      <div class="control">
      <input type="text" name="telephone" id="telephone" value="<?php echo $block->escapeHtml($block->getFormData()->getTelephone()) ?>" title="<?php /* @escapeNotVerified */ echo __('Phone Number') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('telephone') ?>">
      </div>
      </div>

      <?php $_streetValidationClass = $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('street'); ?>

      <div class="field street required">
      <label for="street_1" class="label"><span><?php /* @escapeNotVerified */ echo __('Street Address') ?></span></label>
      <div class="control">
      <input type="text" name="street[]" value="<?php echo $block->escapeHtml($block->getFormData()->getStreet(0)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address') ?>" id="street_1" class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
      <div class="nested">
      <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
      <?php for ($_i = 2, $_n = $this->helper('MagentoCustomerHelperAddress')->getStreetLines(); $_i <= $_n; $_i++): ?>
      <div class="field additional">
      <label class="label" for="street_<?php /* @escapeNotVerified */ echo $_i ?>">
      <span><?php /* @escapeNotVerified */ echo __('Address') ?></span>
      </label>
      <div class="control">
      <input type="text" name="street[]" value="<?php echo $block->escapeHtml($block->getFormData()->getStreetLine($_i - 1)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address %1', $_i) ?>" id="street_<?php /* @escapeNotVerified */ echo $_i ?>" class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
      </div>
      </div>
      <?php endfor; ?>
      </div>
      </div>
      </div>

      <div class="field required">
      <label for="city" class="label"><span><?php /* @escapeNotVerified */ echo __('City') ?></span></label>
      <div class="control">
      <input type="text" name="city" value="<?php echo $block->escapeHtml($block->getFormData()->getCity()) ?>" title="<?php /* @escapeNotVerified */ echo __('City') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('city') ?>" id="city">
      </div>
      </div>

      <div class="field region required">
      <label for="region_id" class="label"><span><?php /* @escapeNotVerified */ echo __('State/Province') ?></span></label>
      <div class="control">
      <select id="region_id" name="region_id" title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>" class="validate-select" style="display:none;">
      <option value=""><?php /* @escapeNotVerified */ echo __('Please select a region, state or province.') ?></option>
      </select>
      <input type="text" id="region" name="region" value="<?php echo $block->escapeHtml($block->getRegion()) ?>" title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('region') ?>" style="display:none;">
      </div>
      </div>

      <div class="field zip required">
      <label for="zip" class="label"><span><?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?></span></label>
      <div class="control">
      <input type="text" name="postcode" value="<?php echo $block->escapeHtml($block->getFormData()->getPostcode()) ?>" title="<?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php /* @escapeNotVerified */ echo $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('postcode') ?>">
      </div>
      </div>

      <div class="field country required">
      <label for="country" class="label"><span><?php /* @escapeNotVerified */ echo __('Country') ?></span></label>
      <div class="control">
      <?php echo $block->getCountryHtmlSelect() ?>
      </div>
      </div>
      <?php $addressAttributes = $block->getChildBlock('customer_form_address_user_attributes');?>
      <?php if ($addressAttributes): ?>
      <?php $addressAttributes->setEntityType('customer_address'); ?>
      <?php $addressAttributes->setFieldIdFormat('address:%1$s')->setFieldNameFormat('address[%1$s]');?>
      <?php $block->restoreSessionData($addressAttributes->getMetadataForm(), 'address');?>
      <?php echo $addressAttributes->setShowContainer(false)->toHtml()?>
      <?php endif;?>
      <input type="hidden" name="default_billing" value="1">
      <input type="hidden" name="default_shipping" value="1">
      </fieldset>


      I also found this code in this file:



      <?php $_taxvat = $block->getLayout()->createBlock('MagentoCustomerBlockWidgetTaxvat') ?>
      <?php if ($_taxvat->isEnabled()): ?>
      <?php echo $_taxvat->setTaxvat($block->getFormData()->getTaxvat())->toHtml() ?>
      <<?php endif ?>






      magento-2.1 registration






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 10 '18 at 10:15









      Rohan Hapani

      6,69331865




      6,69331865










      asked Jan 3 '18 at 22:04









      SylvesterSylvester

      739216




      739216





      bumped to the homepage by Community 11 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 11 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          To use that field at customer registration, you need to enable all the other address fields and then add a addtional field for "vat_id" to /vendor/magento/module-customer/view/frontend/templates/form/register.phtml.



          Then you need to add validation if you want the field to be required.



          In the phtml file there is <?php if ($block->getShowAddressFields()): ?> change this to <?php if (true): ?> to show the address fields.



          Then add a new field:



          <div class="field vat_id required">
          <label for="vat_id" class="label"><span><?= $block->escapeHtml(__('VAT Number')) ?></span></label>
          <div class="control">
          <input type="text" name="vat_id" value="<?= $block->escapeHtmlAttr($block->getFormData()->getVatId()) ?>" title="<?= $block->escapeHtmlAttr(__('VAT Number')) ?>" id="vat_id" class="input-text required <?= $block->escapeHtmlAttr($this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('vat_id')) ?>">
          </div>
          </div>


          Of course you should use an own template file (in your theme or module) for this, instead of the core file.



          Another possibility is https://www.geissweb.de/eu-vat-enhanced-for-magento-2.html which has a config option to show the address fields and the VAT number field at customer registration. You can also add validation to the field with the module, its options are:



          • Optional

          • Optional, but require a valid VAT number when filled

          • Require a valid VAT number, validated through the validation service





          share|improve this answer






















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f207994%2fhow-to-display-field-vat-number-during-registration%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            To use that field at customer registration, you need to enable all the other address fields and then add a addtional field for "vat_id" to /vendor/magento/module-customer/view/frontend/templates/form/register.phtml.



            Then you need to add validation if you want the field to be required.



            In the phtml file there is <?php if ($block->getShowAddressFields()): ?> change this to <?php if (true): ?> to show the address fields.



            Then add a new field:



            <div class="field vat_id required">
            <label for="vat_id" class="label"><span><?= $block->escapeHtml(__('VAT Number')) ?></span></label>
            <div class="control">
            <input type="text" name="vat_id" value="<?= $block->escapeHtmlAttr($block->getFormData()->getVatId()) ?>" title="<?= $block->escapeHtmlAttr(__('VAT Number')) ?>" id="vat_id" class="input-text required <?= $block->escapeHtmlAttr($this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('vat_id')) ?>">
            </div>
            </div>


            Of course you should use an own template file (in your theme or module) for this, instead of the core file.



            Another possibility is https://www.geissweb.de/eu-vat-enhanced-for-magento-2.html which has a config option to show the address fields and the VAT number field at customer registration. You can also add validation to the field with the module, its options are:



            • Optional

            • Optional, but require a valid VAT number when filled

            • Require a valid VAT number, validated through the validation service





            share|improve this answer



























              0














              To use that field at customer registration, you need to enable all the other address fields and then add a addtional field for "vat_id" to /vendor/magento/module-customer/view/frontend/templates/form/register.phtml.



              Then you need to add validation if you want the field to be required.



              In the phtml file there is <?php if ($block->getShowAddressFields()): ?> change this to <?php if (true): ?> to show the address fields.



              Then add a new field:



              <div class="field vat_id required">
              <label for="vat_id" class="label"><span><?= $block->escapeHtml(__('VAT Number')) ?></span></label>
              <div class="control">
              <input type="text" name="vat_id" value="<?= $block->escapeHtmlAttr($block->getFormData()->getVatId()) ?>" title="<?= $block->escapeHtmlAttr(__('VAT Number')) ?>" id="vat_id" class="input-text required <?= $block->escapeHtmlAttr($this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('vat_id')) ?>">
              </div>
              </div>


              Of course you should use an own template file (in your theme or module) for this, instead of the core file.



              Another possibility is https://www.geissweb.de/eu-vat-enhanced-for-magento-2.html which has a config option to show the address fields and the VAT number field at customer registration. You can also add validation to the field with the module, its options are:



              • Optional

              • Optional, but require a valid VAT number when filled

              • Require a valid VAT number, validated through the validation service





              share|improve this answer

























                0












                0








                0







                To use that field at customer registration, you need to enable all the other address fields and then add a addtional field for "vat_id" to /vendor/magento/module-customer/view/frontend/templates/form/register.phtml.



                Then you need to add validation if you want the field to be required.



                In the phtml file there is <?php if ($block->getShowAddressFields()): ?> change this to <?php if (true): ?> to show the address fields.



                Then add a new field:



                <div class="field vat_id required">
                <label for="vat_id" class="label"><span><?= $block->escapeHtml(__('VAT Number')) ?></span></label>
                <div class="control">
                <input type="text" name="vat_id" value="<?= $block->escapeHtmlAttr($block->getFormData()->getVatId()) ?>" title="<?= $block->escapeHtmlAttr(__('VAT Number')) ?>" id="vat_id" class="input-text required <?= $block->escapeHtmlAttr($this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('vat_id')) ?>">
                </div>
                </div>


                Of course you should use an own template file (in your theme or module) for this, instead of the core file.



                Another possibility is https://www.geissweb.de/eu-vat-enhanced-for-magento-2.html which has a config option to show the address fields and the VAT number field at customer registration. You can also add validation to the field with the module, its options are:



                • Optional

                • Optional, but require a valid VAT number when filled

                • Require a valid VAT number, validated through the validation service





                share|improve this answer













                To use that field at customer registration, you need to enable all the other address fields and then add a addtional field for "vat_id" to /vendor/magento/module-customer/view/frontend/templates/form/register.phtml.



                Then you need to add validation if you want the field to be required.



                In the phtml file there is <?php if ($block->getShowAddressFields()): ?> change this to <?php if (true): ?> to show the address fields.



                Then add a new field:



                <div class="field vat_id required">
                <label for="vat_id" class="label"><span><?= $block->escapeHtml(__('VAT Number')) ?></span></label>
                <div class="control">
                <input type="text" name="vat_id" value="<?= $block->escapeHtmlAttr($block->getFormData()->getVatId()) ?>" title="<?= $block->escapeHtmlAttr(__('VAT Number')) ?>" id="vat_id" class="input-text required <?= $block->escapeHtmlAttr($this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('vat_id')) ?>">
                </div>
                </div>


                Of course you should use an own template file (in your theme or module) for this, instead of the core file.



                Another possibility is https://www.geissweb.de/eu-vat-enhanced-for-magento-2.html which has a config option to show the address fields and the VAT number field at customer registration. You can also add validation to the field with the module, its options are:



                • Optional

                • Optional, but require a valid VAT number when filled

                • Require a valid VAT number, validated through the validation service






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered May 10 '18 at 9:49









                EssGeeEssGee

                10119




                10119



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f207994%2fhow-to-display-field-vat-number-during-registration%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Best approach to update all entries in a list that is paginated?Best way to add items to a paginated listChoose Your Country: Best Usability approachUpdate list when a user is viewing the list without annoying themWhen would the best day to update your webpage be?What should happen when I add a Row to a paginated, sorted listShould I adopt infinite scrolling or classical pagination?How to show user that page objects automatically updateWhat is the best location to locate the comments section in a list pageBest way to combine filtering and selecting items in a listWhen one of two inputs must be updated to satisfy a consistency criteria, which should you update (if at all)?

                    Вунгтау (аеропорт) Загальні відомості | Див. також | Посилання | Навігаційне меню10°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.0833310°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.083337731608Vinh AirportVinh airport facelift improves serviceвиправивши або дописавши їївиправивши або дописавши їїр

                    Тонконіг бульбистий Зміст Опис | Поширення | Екологія | Господарське значення | Примітки | Див. також | Література | Джерела | Посилання | Навігаційне меню1114601320038-241116202404kew-435458Poa bulbosaЭлектронный каталог сосудистых растений Азиатской России [Електронний каталог судинних рослин Азіатської Росії]Малышев Л. Л. Дикие родичи культурных растений. Poa bulbosa L. - Мятлик луковичный. [Малишев Л. Л. Дикі родичи культурних рослин. Poa bulbosa L. - Тонконіг бульбистий.]Мятлик (POA) Сем. Злаки (Мятликовые) [Тонконіг (POA) Род. Злаки (Тонконогові)]Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Description from Flora of China) [Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Опис від Флора Китаю)]Poa bulbosa L. – lipnice cibulkatá / lipnica cibulkatáPoa bulbosa в базі даних Poa bulbosa на сайті Poa bulbosa в базі даних «Global Biodiversity Information Facility» (GBIF)Poa bulbosa в базі даних «Euro + Med PlantBase» — інформаційному ресурсі для Євро-середземноморського розмаїття рослинPoa bulbosa L. на сайті «Плантариум»