Several improvements (fork)

Created on 9 October 2020, over 4 years ago
Updated 24 April 2025, 2 days ago

Because I had to move quickly for a client project I have created a fork of this project on github based on 7.x-3.x. The changes include:

  • A complete rewrite of select_or_other.js for readability reasons.
  • Require jquery_update for jQuery-1.7+.
  • Integration into jQuery.val() so that the current value of a select_or_other field can be queried and set easily from JS.
  • Catch change events from the select or other field and turn them into a change event on the select_or_other wrapper making it behave more like a single form element.
  • Improve distinction between automatic (on load, JS caused) witout animation and interactive updates with animation.
  • Add a new mode for the field’s behaviour where the other textfield is shown always, and the other option is selected implicitly by navigating to the textfield.
  • Dynamically add .select-or-other-selected class when the other option is selected.

Apart from client requirements (new behaviour mode, extra classes) the motivation for these changes was to integrate with webform prefill .

If there is interest in some of these changes I can try to split them up into smaller drupal.org issues. Is there intereset? Is the 7.x-version still maintained?

💬 Support request
Status

Closed: outdated

Version

3.0

Component

Code

Created by

🇦🇹Austria torotil

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024