• Resolved matlino


    I am using a single option select field with a search bar to let users select the city. So I have almost 3000 options in this select field. The problem is after I click on the select field, I have to wait a couple of noticeable moments until the search bar and options appear. On the mobile device, it’s much worse.

    I found out that after clicking on the select field, options are rendered within HTML DOM. So I guess performance depends on the client CPU. I think that selecting the city or other location is quite a common use case and a lot of the times it means thousands of options inside the select field. Would it be possible for you to implement additional settings for a select field to improve performance in such use cases?

    One relatively simple solution came to my mind:
    1. Display only the search bar and don’t render/display options after the user clicks on the select-field.
    2. Render options after user type X number of characters to select field.

    This way, the number of rendered options can be reduced. I was trying to achieve this by tweaking code in assets/forminator-ui/js/select2.full.js file. But I didn’t succeed. It would be great if you could point me in the right direction of what code needs to be edited.

    I was thinking also about an alternative, more dirty workaround:
    1. Click on the select-field after page renders using jQuery and hide rendered options.
    2. After the user clicks on the select field, just display the options with my custom click event handler.

    I guess I would have to tweak the BE code anyway, due to possible conflicts in event handlers when clicking on the select field or closing it.

    Let me please know, which workaround would be simpler in our opinion. I will highly appreciate every advice. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Prathamesh – WPMU DEV Support


    Hello @matlino,

    I see this to be a super valid thing and I understand the complexity too which is why I have sent this to the Forminator team to check the scenario and look if we can in some way help you improve it or if we can bring in a quick fix to it.

    Would you be comfortable sharing the link to the form just to check things deeply?

    Thank you,
    Prathamesh Palve

    Thread Starter matlino


    Hi @wpmudev-support7,
    here is the link to the form:

    The field with the placeholder “Lokalita” is the one with lots of options. You can easily compare the performance with the one having placeholder “Typ udalosti”.

    Thank you

    Plugin Support Adam – WPMU DEV Support


    Hi @matlino

    Thank you for response!

    I can confirm that we already have it tasked internally so our developers will look into it to see how to improve performance in such cases. I don’t have an ETA and more information for now but I can confirm it will be significantly improved with one of future releases.

    Best regards,

    Plugin Support Patrick – WPMU DEV Support


    Hi @matlino

    I hope you are doing well.

    We haven’t heard from you in a while, I’ll go and mark this thread as resolved.

    However, feel free to let us know if you have any additional question or problem.

    Best Regards
    Patrick Freitas

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Select field performance’ is closed to new replies.