Conditional visibility state for fields not working on mobile devices

Created on 22 July 2024, about 2 months ago
Updated 24 July 2024, about 2 months ago

Problem/Motivation

Using Drupal 10.2.5. I recently updated the webform module to deal with an issue which was merged into that version.

We have a multi-page webform with Ajax enabled. We have a lot of fields which become visible if certain conditions are met. It's come to my attention that these are not working on mobile devices. I didn't see this because it's not an issue with mobile simulators in the browsers and we don't have many multi-page conditionals. I don't know at the moment whether this is isolated to multi-page.

Steps to reproduce

With Drupal 10.2.5 and Webform 6.2.5 installed, create a multipage form with Ajax enabled. Create a checkbox question with Yes/No. Create another text field which becomes visible if the checkbox is Yes. Go to the form on a mobile device to see whether the conditional is working.

I'm going to try updating Drupal tomorrow. We've been putting this off and I'm hoping this is something related to the version of Drupal and webform.

πŸ› Bug report
Status

Closed: works as designed

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rraney

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @rraney
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    If there are steps to reproduce it’s a bug report. Exactly which mobile devices and browsers are affected? Can you provide the YAML of a small example form? Can you reproduce the bug at https://simplytest.me/?

  • πŸ‡ΊπŸ‡ΈUnited States rraney

    I don't see Drupal webform 6.2.5 listed at Simplytest. The Drupal version is 10.3.1 and I don't know how to downgrade. I got the form imported and it works fine with 10.3.1 and the most recent version of this module.

    The mobile devices affected include my personal Android phone and iOS phones used by end users. I have not tested on a tablet because I simply do not have one.

    I'm including the YML file as an attachment.

  • πŸ‡ΊπŸ‡ΈUnited States rraney

    This issue appears to be resolved. The culprit was custom JavaScript which needed to be cleaned up. It was really hard to find the error because it was only happening on mobile. Therefore I couldn't properly inspect or use DevTools. Regardless, if this happens to someone else, I'd recommend taking a hard look at JavaScript errors and conflicts which might mess up the normal functioning, presumably through jQuery UI or some other JS mechanism.

  • Status changed to Closed: works as designed about 2 months ago
  • πŸ‡ΊπŸ‡ΈUnited States rraney
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    You can use browser dev tools on mobile devices, often by tethering the phone to a workstation. It varies by browser.

Production build 0.71.5 2024