I'm using a matrix field that has checkbox and textfield columns. None of them are required and I've verified that they are stored in the db correctly. Yet when I go to the form, all of the textfields throw required errors (even though they are not). It doesn't happen with checkboxes.
I commented out line 515 and that skips verification to get around this, but obviously not the ideal fix
if ($col['#required'] == TRUE && $values[$row_key][$col_key] == '') {
//form_error($element[$row_key][$col_key], t("Cell at %col x %row is required", array('%row' => strip_tags($element['#first_col'][$row_key]), '%col' => strip_tags($element['#header'][$col_key+1]))));
}
Comments
Comment #1
emilyf commentedAlso, I tried to test this on latest dev but that appears completely broken when i upgrade to it. It was unusable so I stuck with the alpha release.
Comment #2
aasarava commentedI ran into this bug too. What you really need to do is look in the _matrix_process() function for the following code:
Notice the #required attribute is set twice, and the second time it is TRUE? Comment out the second one.
Can any of the maintainers let us know if there was some reason for forcing the textfield to TRUE? Or is this just a typo that needs fixing?
Comment #3
levacjeep commentedCould this be added to the dev?
Comment #4
Anonymous (not verified) commentedI can confirm that this is still an issue in the 2.0 beta release.
I followed #2 and it solved the issue.
Should be committed!
Comment #5
intrafusionMarking as Closed (won't fix) as the new co-maintainer will be focusing on D7