libreform / wp-libre-form

Easy native HTML5 forms for WordPress. Version 1.5 is unmaintained, but works without issue. 2.0 has been rewritten from the ground, and can be found at https://github.com/libreform/libreform
https://wordpress.org/plugins/wp-libre-form
GNU General Public License v3.0
67 stars 27 forks source link

Moved wplf form initialization under window.wplf.attach #36

Closed jpeltoniemi closed 7 years ago

anttiviljami commented 7 years ago

Looks fine to me. What's the rationale behind this?

anttiviljami commented 7 years ago

Thanks for the PR btw! 😊 👍

jpeltoniemi commented 7 years ago

I thought I needed to attach Libre Form to a dynamically generated form. Didn't really think it through and just made the changes before deciding if it is actually needed. But it seems to work and should open up more possibilities for other use cases, so why not 😄

anttiviljami commented 7 years ago

Ok cool. I see no reason why not to do this. I guess it's good to have a way to dynamically call window.wplf.attach :+1:

Merging!