Skip to content

Forms inside a heavy (takes long time to load) lazy-loaded Listing Grid never initialize if no form exists in the initial page HTML #689

Description

@wasoo123

Environment

  • JetFormBuilder: 3.6.4.2
  • Drag and Drop File Upload addon: 1.0.5
  • JetEngine: 3.8.13.1

Problem

A form rendered inside a JetEngine Listing Grid with Lazy load enabled and a heavy query as source (takes a long time to load) is never bound by JetFormBuilder's JavaScript. The HTML renders, but the fields are inert — a Drag and Drop File Upload field accepts nothing, by drag or by click.

This only happens when no other form is present in the initial page HTML. If any form exists at page load, the lazy-loaded forms initialize correctly — including grids that finish loading 10+ seconds later.

This suggests JetFormBuilder only arms its dynamic-content observers if it finds a form during the initial scan, and bails out otherwise.

Reproduce

  1. Form with a single Drag and Drop File Upload field, placed in a Listing template.
  2. Listing Grid on a page with Lazy load on, using a query slow enough to load after the rest of the page.
  3. No other form anywhere in the initial page HTML.
  4. Load the page, scroll the grid into view, try to upload.

Workaround

Rendering one instance of the form outside the grid, hidden with display: none, makes every lazy-loaded copy work. It has to be real HTML in the initial response.

Note

3.1.4 shipped FIX: Compatibility with JetEngine Lazy load in the listing. That fix no longer covers this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions