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

Allow loading form HTML from a HTML file #89

Closed rask closed 6 years ago

rask commented 6 years ago

Sometimes projects have static forms that work better when committed into project source code.

Would it be overkill to allow defining forms in a regular HTML file which would be imported to libre-form via a registration hook. Otherwise the form admin would be available but the form HTML field would be set to readonly with a note about which static HTML template file is being used in it.

If this would work better as a standalone plugin are the hooks in place to implement such a behavior and if not would it be OK to add those?

k1sul1 commented 6 years ago

Sometimes? More like always :')

I think registering forms from PHP is something that the "core" should do, so I'm voting for that. If someone disagrees, surely we can at least add hooks for that.

timiwahalahti commented 6 years ago

I definitely agree that core should support usage of static forms from filesystem. Usage of version control system is good practice and wplf needs to support that.

@rask Would you like to make a PR?

rask commented 6 years ago

I will need to allocate some time to this but I can start working on this quite soon presumably.

rask commented 6 years ago

Oh this was left open. I'll close it.