Problem/Motivation

When using IFE on a select2 field, the error message displays before the field.

Proposed resolution

Add js code to manage select2 fields

See patch attached

Comments

New Zeal created an issue. See original summary.

NewZeal’s picture

jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new4.93 KB
new960 bytes

Thanks for the patch.

The attached webform replicates the issue.

I made on minor tweak to make the selector a little more specific to webform (prefixing is with .webform-select2 ~ ) and more general for select2 (using just .select2).

.select2-container => .webform-select2 ~ .select2

jrockowitz’s picture

StatusFileSize
new1008 bytes
new5.24 KB

Looks like chosen has the same issue and choices simply does not work with clientside validation.

At the very least we should fix chose using the same solution.

NewZeal’s picture

That is a good idea. It is a matter of finding out what the selectors are. I've tested patch #4 and it works fine. Thanks.

paulocs’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new14.08 KB
new35.11 KB

Patch looks good.

Attaching screenshots...

I tested first with the clientside_validation dev branch and the error persisted. As I checkout clientside_validation 3.0.0-rc4, I see that the issue was solved. I'll have a look at this problem and see if I open a new issue here or in the clientside_validation issue queue.

  • jrockowitz committed 19d6f8f on 6.1.x
    Issue #3253167 by jrockowitz, New Zeal, paulocs: Webform clientside...

  • jrockowitz committed 19d6f8f on 6.x
    Issue #3253167 by jrockowitz, New Zeal, paulocs: Webform clientside...
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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