Jump to content

[SOLVED] DNI and ZIP code


Recommended Posts

I made DNI and ZIP code mandatory for creating a new account.

But I selected in BO "Single page checkout", and I want the buying form from the cart to be a "Quick order", so for the "new account" on that page, where DNI and ZIP code is also mandatory (because they are handled by the same class), I just want to give them a default value and to hide them.

 

So, in order-opc-new-account.tpl, I've replaced

 

<p class="required text dni">
 <label for="dni">{l s='Identification number'}</label>
 <input type="text" class="text" name="dni" id="dni" value="{if isset($guestInformations) && $guestInformations.dni}{$guestInformations.dni}{/if}" />
 <span class="form_info">{l s='DNI / NIF / NIE'}</span>
 <sup>*</sup>
</p>

 

with

 

<p class="hidden">
 <label for="dni">{l s='Identification number'}</label>
 <input type="text" class="text" name="dni" id="dni" value="123456" />
 <sup>*</sup>
</p>

 

and something similar for ZIP code.

 

But I still get those 2 errors, like I have no values for those fields:

1. ZIP / Postal code is required

2. Identification number is incorrect or has already been used.

 

Need some help, please.

Link to comment
Share on other sites

Me again :)

 

It works if I replace

<p class="hidden">

 

wich means display: none;

 

with

<p style="visibility:hidden;height: 1px;">

 

Because on visibility: hidden the input is just hidden but the space remain, I've added height: 1px, just to decrease a little the empty space.

Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...