CCK now has drupal_alter on widget settings; though just in a way that allows addition of settings ie can't undo requred using it

For a module that uses it, can look at multicolumncheckboxesradios

Also, imagefield, filefield type use some non-required setting of the field itself to check on if the field is required, so cck required by role wasn't working with them to my experience

Attached is patch, haven't tested too much.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Architeck’s picture

I can confirm that required by role is not currently working with filefield module.

Tried this patch, however now I don't even see the required by role fieldset in the field configuration page.

joelstein’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Active » Needs review
FileSize
5.55 KB

I have adjusted the patch so that the field settings use the hook_widget_settings_alter function, and it actually works. Also, I fixed FileField integration. Please test it out, and commit if possible.

kbk’s picture

Patch in #2 works for problems related to the Date Module field (i.e., couldn't exempt Admin Role from required fields.)

More testers please!

sdsheridan’s picture

Subscribing.

MaxWesten’s picture

I applied #2 patch and found out id didn't iterate into formgroups and thus was not working for most of my exceptions I wanted to use.

Attached you'll find a new patch, that includes #2 and adds the iteration into formgroups.

anders.fajerson’s picture

#2 works for my purpose, fixing date fields which didn't work in 6.x-1.x-dev. #5 creates a very long loop.

FiNeX’s picture

I've tested patch #5 and it works fine.