terminal42 / contao-leads

Leads extension for Contao Open Source CMS; Store and manage form data with ease!
GNU Lesser General Public License v3.0
35 stars 24 forks source link

Fix non-empty label preference in backed lead list #163

Open rabauss opened 3 days ago

rabauss commented 3 days ago

Fixes https://github.com/terminal42/contao-leads/issues/162 with incorrect label resolution in the label listener when label and value data are arrays.

Previously, the label listener incorrectly handled label and value data provided as arrays. This PR ensures that the correct label is used by iterating over both arrays and prioritizing non-empty labels.