Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Adding field requirements to Tax/Vat
 
jkusuda
Jr. Member
 
Total Posts:  5
Joined:  2009-07-28
 

Since I’m in the US and we require a Federal Tax ID for customers to register, I’ve changed the Tax/Vat field label to Federal Tax ID Number.  They are all 9 digits in length and I want to make this the field requirement.  Any ideas on how to do this?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

I just put this together:

http://www.magentocommerce.com/wiki/howto/automatically_set_title_case_on_one_page_checkout

It is an example of how you can use Javascript to validate your forms. With a similar method you can make sure that only nine digits are entered. For tips on that, see:

http://www.webcheatsheet.com/javascript/form_validation.php

You can also edit validate.js if you want to do it that way.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top