Pattern is applied even when field value is empty

Created on 15 February 2023, over 1 year ago
Updated 6 June 2023, about 1 year ago

Problem/Motivation

When assigning a pattern, the pattern is applied even when the field is empty when using the label in the pattern.
This could be works as designed, but I'm curious why that would be.

Steps to reproduce

  1. Apply a pattern using one of the formatters.
  2. Set the label to one of the fields.
  3. Set the value to one of the fields.
  4. Make sure the field is not filled with a value.
  5. Check in the frontend of the website that the pattern is rendered, even without having a value except for the label.

Proposed resolution

Check if the field is not empty to apply the pattern.

Remaining tasks

Discuss why this behaviour is like this.
Provide an option to not render the pattern when the field is empty.
Create and review the patch.

User interface changes

The pattern will not be rendered anymore when the field is empty.

API changes

-

Data model changes

-

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024