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

Comments

hawkeye.twolf created an issue. See original summary.

penyaskito’s picture

Status: Active » Needs review
StatusFileSize
new1.22 KB

We can use the obligation of using the preprocess in our advantage by checking if the widget #errors messages are set.
Patch attached.

penyaskito’s picture

While writing a test found that we also need to check subwidgets.

The last submitted patch, 3: sam-3293674-show-more-items-when-errored-3.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

Status: Needs review » Needs work

Still needs work. If I allow 4 elements, and 1-2 are OK, 3 fails, 2nd element won't be visible and it should be.

penyaskito’s picture

This should work now.

We have only-tests with HEAD and only-tests with the patch at 3 to verify I fixed it.

The last submitted patch, 6: sam-3293674-show-more-items-when-errored-4.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

StatusFileSize
new6.17 KB

Too many patches, messed up 3-4. Re-uploading.

Status: Needs review » Needs work

The last submitted patch, 8: sam-3293674-show-more-items-when-errored-3-4.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

Status: Needs work » Needs review

Tests passed and failed as expected.

marcoscano’s picture

Status: Needs review » Fixed

Nice! Thanks for contributing. Committed and tagged 1.1.2 with this fix.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.