I’m having a problem with Grid field validation and Ansel. Particularly in this case, if there are two Ansel fields in a grid and both require at least one image.
Here is a video demonstrating this issue.
Strange one. I can’t reproduce with our fields so it’s likely something you should be able to change on your end. The “There was a problem with one or more Grid fields” shouldn’t show up for AJAX validation, we only validate the individual fields inside the Grid that are interacted with, not the entire Grid, so something is happening where it thinks that message is the result of your fieldtype’s validation and placing it in your fieldtype’s cell, the selectors should be fine. There’s a lot going on here, probably quicker if you could send me a copy of Ansel if you don’t mind?
I think what’s going on is the input you’re triggering the change
event on isn’t the base name of the field, it’s suffixed with [placeholder]
. This is unexpected, but I think we can and probably should account for that on our end. So, you can either wait for a release from us, or change your input name. Here is the change to EE I would make:
Open system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php and find this code on line 554:
if ($field == 'field_id_'.$this->field_id.'[rows]['.$row_id.']['.$col_id.']'
And REPLACE it with:
if (strpos($field, 'field_id_'.$this->field_id.'[rows]['.$row_id.']['.$col_id.']') === 0
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.