I just noticed that the required checkbox on the product creation/edit form for text field attributes doesn't make the field required. Tt works as intended for select list type attributes. The only way to make a text field required is to set the field to required on the option set field settings which makes it required everywhere, and not on a product by product basis. See screenshots of a text attribute and list attribute that are both set as required on the product but only the list is required on the add to cart form.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aramboyajyan’s picture

Status: Active » Needs work

I can confirm that this issue exists; will post here if I find a patch.

aramboyajyan’s picture

Assigned: Unassigned » aramboyajyan
Status: Needs work » Needs review
FileSize
1.08 KB

Attached is the patch. It appears to be working on my end - someone else please test this as well.

Updating the status and assigning this issue to myself.

Thanks!

stebentje’s picture

Perfect, the patch works, many thanks!

GiorgosK’s picture

even if I set the option "required" in the option set
as the original poster says the -none- appears as an option

if I actually set each option to default not to "none" than the "none" dissapears
but that means we are forcing the user to select the default options everytime they create and option set

the patch applied cleanly to "7.x-1.0-beta4"
but does not work as expected