Jump to content

Can someone check this code for me?


Recommended Posts

There are no states available on my State drop down list in the address form. This is the code for the registration process in /authentication.tpl. Shouldn't each state be listed, as it is with the months for Date of Birth?

 

 

</div>
                        {elseif $field_name eq "State:name"}
                            {assign var='stateExist' value=true}
                            <div class="required id_state select form-group">
                                <label for="id_state">{l s='State'} <sup>*</sup></label>
                                <select name="id_state" id="id_state" class="form-control">
                                    <option value="">-</option>
                                </select>
                            </div>
                        {/if}
                    {/foreach}
                    {if $stateExist eq false}
                        <div class="required id_state select unvisible form-group">
                            <label for="id_state">{l s='State'} <sup>*</sup></label>
                            <select name="id_state" id="id_state" class="form-control">
                                <option value="">-</option>
                            </select>
                        </div>
                    {/if}
                    {if $postCodeExist eq false}
                        <div class="required postcode unvisible form-group">
                            <label for="postcode">{l s='Zip/Postal Code'} <sup>*</sup></label>
                            <input type="text" class="form-control" name="postcode" id="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{/if}" onblur="$('#postcode').val($('#postcode').val().toUpperCase());" />

 

I also noticed this near the top of the page and thought it might be relevant.

 

{include file="$tpl_dir./errors.tpl"}
{assign var='stateExist' value=false}
{assign var="postCodeExist" value=false}
{assign var="dniExist" value=false}
{if !isset($email_create)}
    <!--{if isset($authentification_error)}
    <div class="alert alert-danger">
        {if {$authentification_error|@count} == 1}
            <p>{l s='There\'s at least one error'} :</p>
            {else}
            <p>{l s='There are %s errors' sprintf=[$account_error|@count]} :</p>
        {/if}
        <ol>
            {foreach from=$authentification_error item=v}
                <li>{$v}</li>
            {/foreach}
        </ol>

 

Edited by RDJ (see edit history)
Link to comment
Share on other sites

make a backup and try to replace the /authentication.tpl. with the latest version of the fetault theme, sometimes the error is from a javascript error or custom javascript code, so check if you get any js error and post here.

Link to comment
Share on other sites

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...