While configuring a fresh installation of Mautic 7.1.2, I encountered an issue affecting custom Contact fields of type Select (Single Choice) and Multi Select.
Environment
- Mautic 7.1.2
- Plesk Obsidian
- AlmaLinux 9
- PHP 8.2
- MariaDB 11.8
Observed Behaviour
When creating a custom field of type:
- Select (Single Choice)
- Multi Select
I added options using the field editor and entered only the option labels, as the interface appeared to imply that values would either be generated automatically or were optional.
For example:
| Label | Value |
|---|---|
| Free | (left blank) |
| Standard | (left blank) |
| Premium | (left blank) |
The field itself saved successfully and remained visible within Mautic. However, when reopening the field, the options did not function correctly and appeared to have lost their associated values.
Investigating the database revealed that the field had been saved, but each option had been stored with an empty value.
Example from the crm1lead_fields table:
a:1:{s:4:"list";a:3:{
i:0;a:2:{s:5:"label";s:4:"Free";s:5:"value";s:0:"";}
i:1;a:2:{s:5:"label";s:8:"Standard";s:5:"value";s:0:"";}
i:2;a:2:{s:5:"label";s:7:"Premium";s:5:"value";s:0:"";}
}}
Resolution
The issue was resolved by manually entering both the Label and Value for every option.
For example:
| Label | Value |
|---|---|
| Free | Free |
| Standard | Standard |
| Premium | Premium |
After doing this, the field behaved correctly and the options were retained.
Question
Is this the intended behaviour in Mautic 7.1.2?
If values are mandatory, it may be helpful if the interface:
- Clearly indicates that the Value field must be completed; or
- Automatically populates the Value field from the Label when left blank.
This may help other users configuring Select and Multi-Select custom fields for the first time, as the current behaviour can make it appear that field options are not being saved correctly when in fact the option values are simply being stored as empty strings.
