Skip to content

[Feature]: Modernize Custom Forms frontend and consolidate jQuery versions #5771

Description

@hamsa-09

Problem Statement

The Custom Forms module currently loads an additional, legacy version of jQuery (1.5.1) and an outdated validation library (1.8.1) alongside the modern jQuery 3.6.0 used by the rest of the site. This creates:

  • Redundant network requests: Loading two versions of jQuery on the same page.
  • Memory overhead: Two separate jQuery instances running in the browser.
  • Code complexity: Have to manage two different jQuery aliases ($j and $jcf).

Proposed Solution

  • Remove the redundant loading of jQuery 1.5.1 and unify the Custom Forms module on the site-wide jQuery 3.6.0.
  • Update the jQuery Validation plugin to version 1.19.5 .
  • Update customforms-validation.js to use modern ES6 syntax and the global $j instance.
  • Add a lightweight jQuery.browser polyfill to maintain support for the legacy qTip library without needing a separate jQuery 1.x instance.
  • Delete the unused jquery-1.5.1.min.js file from the repository.

Alternatives Considered

No response

Additional Context

This change specifically modernizes the templates/customforms/ module, which was one of the few remaining areas using Python 2 frontend dependencies.
I would like to work on this issue assign this to me.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions