Mautic 7.1.2 – Select and Multi-Select Custom Fields Save Empty Values Unless Manually Entered

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.

… not sure I understand, but if you didn’t enter valid values, they are missing. You will have added a custom field with a label but without values.

In your example, it could be that “Free” as a label is connected with value “f”.
So yes, you need to add both label and value. Good thing is, that if you e.g. map it with a contact field, you can have several forms with labels in different languages, but still use the same value for all.

Thank you for the clarification.

I understand that Mautic supports separate Labels and Values, and I can see the benefit of that approach for multilingual forms and integrations.

However, the reason I initially assumed the values would be generated automatically is that the interface itself appears to suggest this. In the field editor, the Value column is displayed as:

“Value (autogenerated)”

(see attached screenshot)

Based on that wording, I interpreted the Value field as optional and expected Mautic to generate a value from the Label when left blank.

In my testing on Mautic 7.1.2, leaving the Value field blank resulted in the field options being saved with empty values in the database. The field itself was created correctly, but the options did not behave as expected until I manually entered both Label and Value for every option.

Once I explicitly populated the Value column, everything worked correctly.

So the issue may not be that Mautic is malfunctioning, but rather that the current UI wording appears to indicate that values will be generated automatically when they are not. At the very least, the wording seems likely to confuse new users configuring Select and Multi-Select fields for the first time.

Has the “Value (autogenerated)” behaviour changed recently, or is the field expected to be completed manually despite the label?