Open aldavigdis opened 5 years ago
If this remains unsolvable, we could for perhaps hook into the "convert to blocks" event and display a warning about the contact form being reset, reminding the user that an undo may be performed to restore the form to its previous state.
The support for the conversion of shortcodes into blocks seems quite limited compared to the conversion of blocks between different types, even if it uses the same API.
This means that shortcodes nested inside others — in our cases form fields inside of a contact form — cannot be parsed properly by Gutenberg. Currently, defaults from the
JetpackContactForm
component found injetpack-contact-form.jsx
are used, which essentially sets each form block to a default state, replacing any user-defined field.The Gutenberg API documentation does not explicitly indicate the limitation of shortcode conversions. I do think it should be a bit clearer on that, if this is not possible to do.
A PR for the WIP and R&D is at https://github.com/Automattic/wp-calypso/pull/28611
An issue ticket has been created within Gutenberg related to this at https://github.com/WordPress/gutenberg/issues/12235