Jetpack's Contact Form sends an email notification for each form to the post author by default. That can be changed for each contact form individually, by setting a custom to value.
In the block editor, the recipient email field displays the current user's email address by default, and when saving an updated form, the to value is not updated if the field value matches the default value. It consequently creates an issue when someone other than the post author wants to update that value to their own email address ; their change is not saved because the value they entered matches the default email field value (the current email address).
The only workaround in this scenario is to enter 2 email addresses, since the field value then does not match the default.
Steps to reproduce
[!NOTE]
Start with a site where you have 2 registered users: the main admin (email address admin@example.com) and an editor (email address editor@example.com).
Log in as the admin, install, activate, and connect Jetpack to WordPress.com.
Go to Pages > Add New
Insert a Form block on the page.
Publish the page.
At that point, if someone submits a form on that page, an email is sent to the page author's email address, admin@example.com.
Log out of the site.
Log back in with the editor's account.
Go to Pages > All Pages
Open the page containing the form in the block editor.
Click on one of the form block elements.
Click to get to the parent block, the contact form block.
Check the block sidebar: you will find the "Email address to send to" setting.
The email address listed there is the editor's one, editor@example.com.
If someone submits the form on the frontend, emails will continue to be sent to admin@example.com.
At this point, let's say you make some changes to the page, and save your changes.
A clear and concise description of what you expected to happen.
Since the form settings indicated editor@example.com when I hit save, I would expect that to be the new recipient email address value from now on.
What actually happened
If I refresh the page, and then view the code editor view of the block editor, I do not see any to block attribute saved for the contact form block. The form still uses the default recipient email address, the page author email address, admin@example.com.
Impact
Some (< 50%)
Available workarounds?
No but the platform is still usable
If the above answer is "Yes...", outline the workaround.
No response
Platform (Simple and/or Atomic)
Simple, Atomic, Self-hosted
Logs or notes
This was originally reported and discussed here: p9F6qB-gom-p2
Impacted plugin
Jetpack
Quick summary
Jetpack's Contact Form sends an email notification for each form to the post author by default. That can be changed for each contact form individually, by setting a custom
to
value.In the block editor, the recipient email field displays the current user's email address by default, and when saving an updated form, the
to
value is not updated if the field value matches the default value. It consequently creates an issue when someone other than the post author wants to update that value to their own email address ; their change is not saved because the value they entered matches the default email field value (the current email address).The only workaround in this scenario is to enter 2 email addresses, since the field value then does not match the default.
Steps to reproduce
admin@example.com
.editor@example.com
.admin@example.com
.A clear and concise description of what you expected to happen.
Since the form settings indicated
editor@example.com
when I hit save, I would expect that to be the new recipient email address value from now on.What actually happened
If I refresh the page, and then view the code editor view of the block editor, I do not see any
to
block attribute saved for the contact form block. The form still uses the default recipient email address, the page author email address,admin@example.com
.Impact
Some (< 50%)
Available workarounds?
No but the platform is still usable
If the above answer is "Yes...", outline the workaround.
No response
Platform (Simple and/or Atomic)
Simple, Atomic, Self-hosted
Logs or notes
This was originally reported and discussed here: p9F6qB-gom-p2