libreform / libreform
Easy native HTML5 forms for WordPress
Installs: 299
Dependents: 0
Suggesters: 0
Security: 1
Stars: 28
Watchers: 6
Forks: 7
Open Issues: 16
Type:wordpress-plugin
Requires (Dev)
- dev-master
- 2.0.11
- 2.0.10.1
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6.1
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-beta.12
- 2.0.0-beta.11
- 2.0.0-beta.10
- 2.0.0-beta.1
- 2.0.0-beta.0
- 1.5.0.3
- 1.5.0.2
- 1.5.0.1
- 1.5.0
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4
- 1.3.1
- 1.3
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2
- 1.1.2
- 1.1.1
- 1.1
- 1.0.2
- 1.0.1
- 1.0
- 0.2
- 0.1
- dev-dependabot/npm_and_yarn/tough-cookie-and-node-sass--removed
- dev-dependabot/npm_and_yarn/is-svg-and-postcss-svgo--removed
- dev-dependabot/npm_and_yarn/json-schema-and-jsprim-0.4.0
- dev-erroless-historydeletion-failure
- dev-test/older-php
- dev-publishtonpm
This package is auto-updated.
Last update: 2024-11-08 19:42:04 UTC
README
Use standard HTML5 markup to create fully functional forms for WordPress.
The older 1.5 branch is not maintained anymore, and will not receive any updates, unless someone steps up to do so. Wouldn't recommend it though.
Features
- Forms are made of plain ol' HTML5; Type it in and it comes out as you intended.
- Works with any* valid HTML form. Just copy a form from a website and it should just work.
- Submissions are saved to the database, each form has it's own table for the submissions
- Forms are stored in a custom post type
libreform
, and the accompanying data is inwp_postmeta
. Importing and exporting your forms is as easy as ever. - Forms are submitted with AJAX by default, but falls back to traditional methods if necessary.
- Validates fields tagged with the native HTML5
required
attribute. Can be extended to validatepattern
attribute if necessary. - It's hackable. Add your own functionality with hooks and APIs. Frontend and backend.
- Email notifications of received form submissions
- File upload support to Media Library and outside with input type=file
- Multilingual support with Polylang
- Imported HTML templates for forms
- Selectors like
## USER_EMAIL ##
,## SUBMISSION ##
and## FORM ##
. Think of it as safe eval. Did we mention it's easy to create more of these yourself? - JavaScript API, written in TypeScript
Why?
Modern HTML markup is a great way to build forms. With Libre Form, there's no need to use clunky form builders that are hard to customise. Ever tried building a pixel perfect implementation of a form design? It's drastically harder when you don't control the markup.
WP Libre Form is built upon the "WYSIWYG" principle. We use the HTML you supply somewhat as-is. We only parse it for selectors and minify it, so wpautop
doesn't murder it.
Server requirements
- PHP 7.3 or newer
- MariaDB,
MySQL mostly works but as it turns out I managed to code a vendorlokki.- MySQL probably no longer works as the table creation code depends on
ADD COLUMN IF NOT EXISTS
andDROP COLUMN IF EXISTS
- If you really really need to run it on MySQL, you can hot-patch the offending lines in class-db-io.php so they don't use the missing
IF EXISTS
feature. As long as you don't use the field deletion feature (link above), you should be good to go.
Further reading
New in 2.0
The plugin has been rewritten from the ground up, breaking backwards compatibility. In other words; WPLF 1.5 is dead, long live WPLF 2.0!
Nothing in particular was wrong with 1.5, but it was getting a little annoying to maintain. The original version was written during ONE WordCamp, and we had added countless new features since that. You can still use the old version, it works as long as WordPress doesn't break backwards compatibility.
As migrations tend to be a pain in the ass, we've made special efforts to ensure that you don't have to migrate. The new version works side by side with the old one. Everything has been renamed so they do not conflict with each other.
Some key changes;
- New directory and slug, from
wp-libre-form
tolibreform
- Shortcode has been renamed to
libreform
fromlibre-form
- The form post type is now
libreform
(the old one waswplf-form
) - API has been camelCase'd
- Actions and hooks have been renamed
- Form submissions live in separate database tables now, each form gets a table.
Screenshots
Form edit screen
Rendered form in the default 2020 theme
Email confirmation
Success message
Installation
The Composer Way (preferred)
Install the plugin via Composer
composer require libreform/libreform
Activate the plugin
wp plugin activate libreform
WordPress.org?
This plugin will not be released on wordpress.org. During the review process, instead of actually reviewing the plugin, Plugin Review Team just wasted my time. They kept arguing that we need to merge the two codebases together and "provide an upgrade" path, despite 2.0 being entirely backwards incompatible. They do not understand how never breaking backwards compatibility is harmful. Can't blame them, 15 years of legacy would turn anyone's brain into soup.
I told them that the plugins are fundamentally different, we have different PHP & browser requirements, etc. Doing what they required would've taken WEEKS for no benefit whatsoever.
The opposite actually. The likelihood of end users updating blindly to 2.0 and breaking literally every form they have is too damn high. Writing migrations takes time, and for what benefit? We do not make any money from this, but you as an enduser hopefully do. The time it takes you to manually migrate 10 forms is most likely billable time, and shouldn't take more than a minute per form.
You can run 1.5 and 2.0 side by side without any issues. That wouldn't be possible with their demands. Instead, every form would have to be migrated, writing migrations would take an absurd amount of time, and there would be no guarantee of them working, considering the "just hack around it" mentality in 1.5.
So, if you don't want to use Composer to manage the plugin, download the latest release from GitHub. There are plans to integrate an update mechanism to the plugin, but no timeline for that has been established yet. Contributions are welcome.