Problem/Motivation
If you use SAM to fill out additional field items and then try save the form, but it doesn't pass validation and just reloads, SAM only shows the first field item; the additional items you filled in are hidden. If you use the SAM button but to show the additional items, the data is still there.
Steps to reproduce
See "Problem/Motivation" above.
Proposed resolution
Pass number of items to JavaScript settings on form rebuild?
Remaining tasks
n/a
User interface changes
n/a
API changes
n/a
Data model changes
n/a
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | sam-3293674-show-more-items-when-errored-4.patch | 6.47 KB | penyaskito |
Comments
Comment #2
penyaskitoWe can use the obligation of using the preprocess in our advantage by checking if the widget #errors messages are set.
Patch attached.
Comment #3
penyaskitoWhile writing a test found that we also need to check subwidgets.
Comment #5
penyaskitoStill needs work. If I allow 4 elements, and 1-2 are OK, 3 fails, 2nd element won't be visible and it should be.
Comment #6
penyaskitoThis should work now.
We have only-tests with HEAD and only-tests with the patch at 3 to verify I fixed it.
Comment #8
penyaskitoToo many patches, messed up 3-4. Re-uploading.
Comment #10
penyaskitoTests passed and failed as expected.
Comment #12
marcoscanoNice! Thanks for contributing. Committed and tagged 1.1.2 with this fix.