Hi,

We are using webform cards to split up a long webform.

We have webform, webform cards, webform client side validation, clientside validation, inline form errors all turned on.

Webform cards which contain required likert components and radio buttons accurately stops a user from progressing forward to the next card. It's the radio button I believe that makes this work properly.

Webform cards that contain 2 sets of required likert components alone doesn't stop the user from progressing to the next card despite being required fields. Only when the submit button is clicked is the user taken back to the likerts that were not filled in.

We would not like the user to progress to the next page if any time of required field is not filled in likert or radio button.

Is this an issue with using likert fields and cards together? How can we resolve this?

Comments

philipjoseph created an issue. See original summary.

jrockowitz’s picture

Status: Active » Postponed (maintainer needs more info)

Please upload an example that can be used to replicate this issue. Please do not share your entire webform, just the simplified elements, and configuration required to reproduce your issue.

ganeshsurya11’s picture

I think the client-side validation doesn't seem to be work with the Likert element. I tried the webform with Ajax and without Ajax setting as well but the Likert element only shows the server-side validation i.e. until we click on its Submit button.

Below is my a small webform source code for which I was trying first:

your_name:
  '#type': textfield
  '#title': 'Your Name'
  '#required': true
area_indiacation:
  '#type': likert
  '#title': 'Area Indiacation'
  '#questions':
    India: India
    Australia: Australia
    NewZealand: NewZealand
  '#answers': likert_comparison
  '#required': true

I feel the client-side validation has not been applied to Likert element yet.

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Active

Yep, Likerts currently do not support clientside.

ganeshsurya11’s picture

Is there any plan to add clientside validation for the Likert element?

jrockowitz’s picture

Status: Active » Postponed
Inactive member requests are deprioritized and marked as postponed until the ticket creator becomes an active member of the community or another active community member offers to help resolve the request. Learn more

Please consider getting involved, funding development, and hiring professional support
jrockowitz’s picture

Status: Postponed » Needs work

@Symphony3 Thank you for backing the Webform module's Open Collective.

jrockowitz’s picture

StatusFileSize
new5.05 KB

Attached is a webform, which can be used to replicate this issue.

jrockowitz’s picture

Version: 8.x-5.25 » 8.x-5.x-dev
Status: Needs work » Needs review
StatusFileSize
new4.2 KB

Attached is the very basic solution. Let's see if all the tests pass.

Status: Needs review » Needs work

The last submitted patch, 9: 3207939-9.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new5.67 KB
philipjoseph’s picture

Hi Jacob, would this patch work for the webform 6.x stream?

jrockowitz’s picture

The patch also works in 6.x.

paulocs’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new3.07 MB

RTBC.

  • jrockowitz authored 5600023 on 8.x-5.x
    Issue #3207939 by jrockowitz, paulocs: Required field validation not...

  • jrockowitz authored 5600023 on 6.x
    Issue #3207939 by jrockowitz, paulocs: Required field validation not...
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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