Email field is empty after saving
Before you start
- You need a model with an email field.
- The model must show as a box on WordPress content. Turn on Add these fields to WordPress content under Advanced > WordPress, then choose the place in Show on. See Add fields to posts, users and terms.
Symptoms
You enter an address in the email field of a model's box on a WordPress edit screen and save. The field is empty afterwards. A notice reads "Morphic fields were not saved: Email needs a valid email address, for example name@example.com".
Cause
Morphic runs an email address through WordPress's sanitize_email() when it saves. WordPress returns an empty value for an address it rejects, so the field saves empty.
Fix
Use this fix when the field stays empty after you save.
If the address is not valid
- Open the post, page, user or term that has the box.
- In the email field of the box, enter the whole address, for example
name@example.com. - Save the change with the button on the WordPress edit screen.
- Check that the address stays in the field.
Still not working?
Note the field name and the address you entered.
Contact us through the contact form with your Morphic version and the exact error text.