Crocoblock / suggestions

The suggestions for CrocoBlock project
191 stars 78 forks source link

JetAppointment - Calendar not rendering when using two of the same forms in a single page #7550

Open Tchelet-Levi opened 4 weeks ago

Tchelet-Levi commented 4 weeks ago

Describe the bug When using either of the form widgets to display the same appointment form (Either the legacy JetEngine one or the new JetFormBuilder), the calendar disappears from both forms. When deleting one form, it suddenly appears.

To Reproduce Steps to reproduce the behavior:

  1. Make an appointment form, either in JetEngine or JetFormBuilder.
  2. In Elementor, use the appropriate form widget to render it. Notice the calendar shows up as expected.
  3. Duplicate the form (or create it from scratch pointing to the same form to render)
  4. Calendar disappears.

Expected behavior The Calendar should appear twice; once for each form it is in.

Additional context The legacy form builder from JetEngine remains quiet, but the JetFormBuilder throws an error in the console:

frontend.js?ver=4f4845edaa0941a0ae13:1 Uncaught TypeError: Cannot read properties of null (reading 'dataset')
    at frontend.js?ver=4f4845edaa0941a0ae13:1:1884
    at index.js?ver=1.0.0:1:2044
    at Sn.observe (main.js?ver=250b7174e5f50c1b4a7a:1:39358)
    at _n (main.js?ver=250b7174e5f50c1b4a7a:1:42167)
    at _runHook (frontend.min.js?ver=3.21.8:2:34943)
    at Object.doAction (frontend.min.js?ver=3.21.8:2:35545)
    at e.exports.runReadyTrigger (frontend.min.js?ver=3.21.8:2:3966)
    at frontend-modules.min.js?ver=3.21.8:2:1107

From what I can see, the error is related to the fact that it wasn't rendered, so it can't find 'dataset' as an object. Not sure if helpful but thought I'd include.