Default processor for Form elements

Description

At this moment, HTML forms that are included in a post or page’s content would need code to make them work as expected. The idea is to create a default Html2React processor that would fix them and solve the problem for most cases.

As any other processor, it could be overwriten in order to cover any specific needs.

Goals

As a frontity user
I want to get support for HTML forms by default
so that I’m not forced to code in order to make them work

Implementation Proposal

Instead of writing a package for this, I would write a simple processor that would turn <input> fields into uncontrolled components, replacing value prop by defaultValue prop. This would make forms that use a php action to work out of the box.

References

  1. Default values for uncontrolled components: https://reactjs.org/docs/uncontrolled-components.html#default-values