Skip to content

Commit

Permalink
[FIX] website: form visibility shows ids instead of labels
Browse files Browse the repository at this point in the history
This commit resolves an issue (arose in [1]) where a select field was
displaying IDs instead of labels.

Steps to reproduce:

- Navigate to edit mode
- Drop a form block.
- Select the form action type "create customer" (CRM app must be
  installed).
- Add a field for "country".
- Add another field and set its visibility to depend on the country
  value.

Issue:
Users are seeing IDs instead of country labels.

[1]: a54f11e

task-3460326
  • Loading branch information
SergeBayet committed Feb 29, 2024
1 parent ab0d7d2 commit 6bcf6f4
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1340,7 +1340,7 @@ options.registry.WebsiteFieldEditor = FieldEditor.extend({
if (dependencyEl.nodeName === 'SELECT') {
for (const option of dependencyEl.querySelectorAll('option')) {
const button = document.createElement('we-button');
button.textContent = option.value || `<${_t("no value")}>`;
button.textContent = option.textContent || `<${_t("no value")}>`;
button.dataset.selectDataAttribute = option.value;
selectOptEl.append(button);
}
Expand Down

0 comments on commit 6bcf6f4

Please sign in to comment.