• Resolved Marin Marinov

    (@mpmarinov)


    Dear Ladies and Gentlemen,

    can you set a search field or what is required so that you can search in form?

    Thanks in advance.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @mpmarinov

    I’m sorry, but I don’t understand your question. What do you mean with search in form?

    Best regards.

    Thread Starter Marin Marinov

    (@mpmarinov)

    Hello @codepeople,

    I have 100 checkboxes or 100 items in a dropdown list.
    How can I make a search field and select the search items, etc?

    Plugin Author codepeople

    (@codepeople)

    Hello @mpmarinov

    You need to integrate external libraries with the form. It applies to the DropDown fields.

    Please, insert an “HTML Content” field in the form with the following piece of code as its content:

    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.8.7/chosen.min.css" integrity="sha256-EH/CzgoJbNED+gZgymswsIOrM9XhIbdSJ6Hwro09WE4=" crossorigin="anonymous" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.8.7/chosen.jquery.min.js"></script>
    <script>
    jQuery(window).on('load', function(){
      jQuery('.cff-dropdown-field select').chosen();
    });
    </script>
    

    And that’s all.

    Best regards.

    Thread Starter Marin Marinov

    (@mpmarinov)

    And can this be done with a checkbox?

    Plugin Author codepeople

    (@codepeople)

    Hello @mpmarinov

    No, I’m sorry, the Chosen library (we are not the developers of this library) can be used only with the DropDown fields.

    Best regards.

    Thread Starter Marin Marinov

    (@mpmarinov)

    Hello codepeople,

    in my website the above code does not work on Chrome, Opera and mobile phone.
    Do you know why that is and what can be done?

    Thanks!

    Plugin Author codepeople

    (@codepeople)

    Hello @mpmarinov

    Yes, you are right, the Chosen library does not have support for mobiles. The alternative here would be to replace the Chosen library with Select2.

    Please, replace the code into the “HTML Content” field with the following one:

    
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/select2.min.css" rel="stylesheet" />
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js"></script>
    <script>
    jQuery(window).on('load', function(){
    jQuery('.cff-dropdown-field select').select2();
    });
    </script>
    

    Best regards.

    Thread Starter Marin Marinov

    (@mpmarinov)

    Unfortunately it doesn’t change. The same remains: under Opera and Chrome there is no search field. It only works on Edge Browser. I don’t know if there are opportunities for others …

    Would be very grateful if you can help me further.

    Best regards!

    Plugin Author codepeople

    (@codepeople)

    Hello @mpmarinov

    Please, indicate the URL to the page where the form is inserted to check it in action.

    Best regards.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Search in form’ is closed to new replies.