• Resolved oscarmoreta

    (@oscarmoreta)


    Hi

    first off, thanks for your job, awesome plugin!

    I want to config the dynamic dropdown down with the following options:

    {
    placeholder: {
    id: “”,
    text: “Select an option…”
    },
    theme: ‘classic’,
    dropdownAutoWidth: true,
    width: ‘100%’,
    allowClear: true,
    dropdownParent: document.getElementById(“select-box”),
    dropdownCssClass: “select2-dropdown-wrapper”,
    selectionCssClass: “select2-selection-wrapper”,
    minimumResultsForSearch: Infinity
    }

    I don’t see how to do it, I needed to implement it fast and I have modified the plugin code with this, but it is not good practice

    s2options[‘placeholder’] = {id: “”, text: “Select an option…”}
    s2options[‘theme’] = “classic”
    s2options[‘dropdownAutoWidth’] = true
    s2options[‘width’] = “100%”
    s2options[‘allowClear’] = true
    s2options[‘dropdownParent’] = document.getElementById(“select-box”)
    s2options[‘dropdownCssClass’] = “select2-dropdown-wrapper”
    s2options[‘selectionCssClass’] = “select2-selection-wrapper”
    s2options[‘minimumResultsForSearch’] = Infinity

    Thanks in advance

    Oscar

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

    (@aurovrata)

    first off, thanks for your job, awesome plugin!

    thank you, please leave a review when you have a moment to spare.

    I want to config the dynamic dropdown down

    Sure, however, I realised there was a small bug in the functionality to do this and so you will need to upgrade to v4.12.0 which I just released.

    You need to load a custom JS file (see this tutorial), and add your own select2 instantiation code.

    Under the Form fields menu you’ll see the select2 options settings code displayed if you have a select2 enabled field in your form.

    image<br />free picture hosting<br />

    The code inserted by the helper code should be self-explanatory.

    If you’re not sure, I plan to upload a tutorial on this in next couple of days.

    Thread Starter oscarmoreta

    (@oscarmoreta)

    It works

    Thanks!!

    Plugin Author Aurovrata Venet

    (@aurovrata)

    no worries! Glad you’re finding the plugin useful.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CF7 Smart grid select2 configuration’ is closed to new replies.