• Resolved igorcherepanov

    (@igorcherepanov)


    Hi, I’m trying to make a form with 5 dynamic dropdown fields, that use select2. I’ve managed to fetch the entries from the DB to populate the dropdown, but the page shows regular dropdown without search.

    The dropdown does work if i view it via “Preview” in the form editor, but if i open the actual page, i see the default select.

    I’m using “twentytwentyfour” theme, although i did try few other, but the result is the same.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    Can you check your page console and see if there are any js errors that prevent the select2 jquery plugin from initialising properly?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    ok, I just looked at your page. How are you inserting your form into the page? I see you are using a block editor. You need to actually use the shortcode block and use the Smart Grid plugin form shortcode to insert the form

    Thread Starter igorcherepanov

    (@igorcherepanov)

    The shortcode was the reason. Thank you!

    What happened is i initially made a form with CF7 and added it to the page, and afterwards installed the Smart Grid plugin. Didn’t think anything was wrong with the shortcode, because all the other changes to the form did show up.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    What happened is i initially made a form with CF7 and added it to the page, and afterwards installed the Smart Grid plugin. Didn’t think anything was wrong with the shortcode, because all the other changes to the form did show up.

    makes sense. Thanks for the explanation, I will have a look at a way to add a warning for this case scenario.

    The plugin’s modified shortcode has 2 advantages,

    1. it uses the form custom post slug as unique identified (the form key) instead of the post ID like the cf7 plugin shorcode does. This makes form portable, IDs change when exported/imported from dev to prod, slugs rarely do.
    2. it adds a wrapper container which stores a number of classes that identify the functionality used by a form, makes form styling more unique and allows for only those functionality dependencies to be loaded on the page and therefore more efficient.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Dynamic dropdown works in preview but not on the actual page’ is closed to new replies.