• Hi,

    The wonderful plugin, seems to do two big computing efficiency mistakes:

    1) The first being, ‘firing’ event for all form’s hundreds of fields, and not designing the JS/JQuery to ‘fire’ only for those specific fields where it’s asked to manipulate the show/hide (toggle) of other <div> element.

    2) The second, choosing to use CHANGE events which follow typing of each character within a given field (see line 25 of the file ‘scripts_es6.js’ and respectively line 156 of the file ‘script.js’:

    var wpcf7cf_change_events = ‘input.wpcf7cf onblur.wpcf7cf click.wpcf7cf onselect.wpcf7cf’;

    I first trued to limit the ‘wpcf7cf_change_events’ VAR to less events as ‘onblur.wpcf7cf click.wpcf7cf’ which speeded-up the form typing, however apparently form drop-down data stored by the plugin was in delay, so it had the previous element selected. This data storing fixed to contain real-time data and not previous selection to-be fixed by you, may solve lots of speed loss. I couldn’t use this technique, as it didn’t properly work only with the drop-down menus (select field type).

    Then, I reverted to older plugin version, which works much faster, although not on high typing speed.

    What I would suggest the following two fixes:

    1) The JQuery event to follow only the specific field-names’ as coded in the ‘conditional field’ tab of the CF7 plugin. For example, this would mean:

    $(‘[name=”field_name[]”]’).on(“keypress keyup blur paste change mouseleave”, function(event){….}

    2) The JQuery event to be better targeting field event changes, without ‘firing’ for each character typed within a field, as suggested above, solving the drop-down data tracking delay.

    3) Possibly, have the ‘conditional-field’ function have a built-in delay having it operate only every 2000ms, so it won’t slow typing input, possibly reducing functions animation built-in existing delay, so operability is not damaged.

    Regards, Ehud

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    Hi Ehund, thanks for this. I’m always interested in improving speed. In a recent update I made some changes and includes some caching (the SimplifiedDOM function). This has sped up the plugin enormously. As previously a page like this was utterly impossible to use: https://conditional-fields-cf7.bdwm.be/lots-of-groups/

    While it is still slow, it’s a good example page to do some benchmarking on. I’m interested in testing out some of your idea’s and have some data to prove that code-changes have a positive effect on performance. If you could help out, maybe creating some branches that I can test for speed agains this page, that would be very helpful. If you feel like contributing, please open an issue or PR on github: https://github.com/pwkip/contact-form-7-conditional-fields

    Thread Starter ziegel

    (@ziegel)

    Will do, with pleasure. Appreciated.

    Note, my form has about 15 divscreens (jquery) and about 40 VAR used on the condition logic plugin. I’ll provide you directly JS, CF7, and page info.

    Ehud

    Thread Starter ziegel

    (@ziegel)

    Hi @jules-colle ,

    May I ask if there are any news regarding the above issue?

    Ehud

    Plugin Author Jules Colle

    (@jules-colle)

    No not yet. I will be very busy in the coming weeks. Sorry

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘New Version Specific Chosen Event ‘Firing’ Kills Forms Usability’ is closed to new replies.