1

I try to put a required-entry to my field "zip" but the <label> <em>*</em> still shows as display:none.

If someone can help me it would be great =)

<li class="fields">
    <div class="field">
        <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
        <div class="input-box">
            <input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text required-entry validate-zip <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
        </div>
    </div>
    <div class="field">
        <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
        <div class="input-box">
            <?php echo $this->getCountryHtmlSelect() ?>
        </div>
    </div>
</li>

enter image description here

As you can see they are: <em style="display:none;">*</em>

and <input [...] class="input-text validate-zip">

even if i set required-entry in my code, the class required-entry is not apply

  • Can you update your question with a link to the page? – ForMat Jan 2 '15 at 12:59
  • Hi, sorry i just forget to make this post as resolved. I just resolved this in backoffice, System > Configuration > General > General And just unselect my country for the optional Postal Code. – Sony Dec 9 '15 at 14:33
0

Instead of required class use required-entry

Let me know if it is solved.

  • Hi, sorry i just forget to make this post as resolved. I just resolved this in backoffice, System > Configuration > General > General And just unselect my country for the optional Postal Code. – Sony Dec 9 '15 at 14:35
1

From admin panel ->catalog->attributes->manage attributes you can edit your zip field properties and set 'Values Required' to 'YES'

  • Sorry but it's a Customer Form. I don't see where is the match with "Catalog" and "Customer" . Manage attributes in Catalog from admin panel is only for products... not for customer – Sony Jan 5 '15 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.