Original value is displayed after setting custom event field blank
Overview
Attempting to change the value of a custom event field from non-blank to blank results in the original value being populated in the form after the form is saved. If the form is subsequently saved again, then the original non-blank value is written to the DB.
Reproduction steps
- Create a custom event fieldset.
- Add a custom field of type Alphanumeric, Single line input field. Accept all default settings.
- Edit an event.
- Set the new custom field to a non-blank value and save the event.
- Set the new custom field to a blank value and save the event.
Current behaviour
The custom field displays the non-blank value. If the form is saved, the blank value currently in the DB is overwritten with the non-blank value.
Expected behaviour
The custom field should display the last saved value: blank.
Environment information
- Browser: Chrome Version 96.0
- CiviCRM: 5.45.alpha1
- PHP: 7.4
- CMS: Drupal 7.82
- Database: MariaDB 10.4
- Web Server: Apache 2.4
Comments
Confirmed on dmaster.demo.civicrm.org