Road to a stable release ๐
This issue outlines the work needed to finish before tagging a stable release.
Blocks
Form
This block mimics the functionality of reusable blocks or template parts by using a CPT to store and retrieve the form. The block is used to insert/edit a form in any post or page and renders the <form>
element.
Field
This block renders a complete form field with a label and input. It also provides variations for the most common field types.
Label
This block renders the <label>
element for a form field.
Button
This block mimics the functionality of the core/button
but renders a <button>
element to perform form actions like submit and reset.
Variations
Input Field
This block renders the <input>
element with a default type of "text" while providing variations for other available types.
Variations
Select Field
This block renders the <select>
element. It also provides a variation for rendering a multi-select element with the multiple
attribute applied.
Variations
Option
This block renders the <option>
element used within an omniform/select
or omniform/fieldset
block.
Option Group
This block renders the <optgroup>
element used within an omniform/select
block.
Textarea Field
This block renders the <textarea>
element.
Fieldset
This block renders the <fieldset>
element.
CAPTCHA
This block renders a CAPTCHA that must pass validation in order for the user response to be saved. Akismet integration is possible in the future with an ability to assign specific fields to the name, email, and message structure that the service expects for spam protection. I'm not a huge fan of the honeypot method at this point but I'm not opposed to adding it if there are enough requests for it.
Google's reCaptcha service seems to be pretty standard but I wanted to present hCaptcha as a privacy-first alternative. Both of these services have an almost identical API and implementing all three was simple and obvious. Friendly Captcha looks like another good alternative that could be implemented at a later date.
Variations
Custom Post Types
This custom post type is for storing all information related to a single form's configuration.
This custom post type is for storing all response data for a single form submission.
Hooks
Documentation