• Resolved johnny538

    (@johnny538)


    Hi,

    I’d like to migrate from my current form plugin to this one, but I’m trying to get rid of any jQuery dependant plugins on my site. My current form plugin is the only plugin that depends on jQuery at the moment and I wanted to ask if Advanced Forms for ACF and the Pro version depend on jQuery. And if so, is there any way to disable or replace this code with vanilla JS?

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

    (@philkurth)

    Hi @johnny538,

    Thanks for checking in. ACF is dependent on jQuery and as a result of that Advanced Forms is also dependent on jQuery. There is so much jQuery driving ACF and Advanced Forms that it wouldn’t be feasible to disable it and replace it with vanilla JS, I’m afraid.

    I don’t know of any form plugins off the top of my head that run without jQuery, given the library is so widely used in the WordPress ecosystem but it wouldn’t surprise me if there was at least one. Failing that, you’ll probably have to go custom.

    Cheers,
    Phil

    I’m avoiding jQuery in WP projects since years now… it is easier than most people think, and really gives a boost in performance. (even WordPress itself is slowly getting away from jQuery too)

    Imho, Advanced Forms is not that large, and you probably can get rid of jQuery quite easy.

    ACF itself is something else, sure. But you could at least start…

    Thread Starter johnny538

    (@johnny538)

    @adrian2k7 Yeah I saw the jQuery code for this plugin is quite minimal. I’m not that good with JS, so I can’t convert it myself, but I wouldn’t mind hiring someone to do that.

    I wasn’t aware yet that ACF Forms itself also requires jQuery. I think I’ll just use the HTML Forms plugin though. It just loads some basic (vanilla) JS for the ajax submission.

    Plugin Author philkurth

    (@philkurth)

    Thanks @adrian2k7. @johnny538, I think simply HTML forms are probably the option if you really need to go super lean. Whilst it would be possible to write your own JS handlers to replace plugin jQuery, it would be brittle and open to failure on future updates. If you roll your own HTML, at least you know it won’t change until you change it.

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