6 replies [Last post]
drupal4normi's picture
Offline
Joined: 01/07/2009
Juice: 20
Was this information Helpful?

How can I set the company field not to be a mandatory field

Even when I switch off in the order settings the company field not to be mandatory, it is in the cart check out a mandatory field. Maybe it is related to the VAT function.

I want to have the VAT and company field not mandatory, because only companies need to fill in the VAT number, private buyers don't need to fill in these fields.

Is this possible? Smiling

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: How can I set the company field not to be a mandatory field

If you're using a contributed VAT module, it sounds like that might be affecting this field. Core Ubercart will not force the company field to be required and in fact makes it optional by default.

drupal4normi's picture
Offline
Joined: 01/07/2009
Juice: 20
Yes I use the VAT module

Hey my first answer from the master himself Smiling

Yes I use the VAT module. But also with the use of VAT module I want to have the VAT and company field not mandatory, because only companies from foreign countries need to fill in the VAT number, private buyers don't need to fill in these fields.

So I want to left the decision to fill in company and VAT the buyer, depending if he is a company or private.

Is this possible?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Yes I use the VAT module

tbh, I haven't used the module, so I can't really say. I can say it should be possible, but that doesn't help ya much. Sticking out tongue If push comes to shove, you can always do this through a custom module using hook_form_alter() ... but it sounds like you might not be a developer?

Damian's picture
Offline
Joined: 01/15/2009
Juice: 21
Not using VAT

We're not using VAT modules, but still finding that the company field is required. I understand that you've stated the core installation does not require this field, but are there any other modules that might force it to be required?

Thanks.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Not using VAT

Did you make it required in your address field settings?

Damian's picture
Offline
Joined: 01/15/2009
Juice: 21
Not Required

The company field is not required, but it is enabled. If found that if I disabled it, it came through as a line with no label followed by a colon. Even in this case, the required prompt comes up.