3 replies [Last post]
pcambra's picture
Offline
Bug Finder
Joined: 01/23/2008
Juice: 251
Was this information Helpful?

Hi

I am a little confused with the "required" and "predefined" configurations of uc_attibute module.

If I check an attribute as required for a product, the combo fills up with a "Please select" and no predefined option is selected by default.

Then, If I don't check the attribute as required, the "please select" goes away and the predefined get selected by default (expected behaviour, i think), but there is not empty option, so the attribute is mandatory too!

Could anybody explain me the sense of the "required" option of the attribute module? I think it is confusing me.

Thanks

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: uc_attributes confusion

This has come up enough that I've made a FAQ page for it: http://www.ubercart.org/faq/5421. Hope that clears things up.

pcambra's picture
Offline
Bug Finder
Joined: 01/23/2008
Juice: 251
Re: Re: uc_attributes confusion

Thanks for the answer Lyle.

But the point is that, in the options of the attribute there are radio buttons that force you to select one of the attributes as predefined, so the result is that the attribute is always mandatory.

If you mark it as required is mandatory because the drupal api form forces you to select one (and then the predefined radio buttons are not used)
If you dont mark it as required, is mandatory too, because one of the attributes is selected by default and you cannot left it blank.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: uc_attributes confusion

Agree with PCambra, I think the required option would behave like the non-required option ATM (with a required form and a default option), and the non-required option would be like the required option without making the form element as required (so with a "please select" line).

It would make more sense.