formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

Select component inside a conditional container displays the value instead of the label when displaying a submission

Open evancook11 opened this issue 5 months ago • 1 comments

Describe the bug When a select component is placed inside a container, if the container is displayed conditionally, the select component will display the selected option's value instead of the label. This happens when the renderMode is html.

Version/Branch https://cdn.form.io/js/formio.embed.js

To Reproduce Steps to reproduce the behavior:

  1. Create a form with any component and a container that is displayed depending on the first component. Inside the container, place a select component with a couple of options to select.
  2. Create a submission for the form, using a value for the first component that will get the container to be displayed.
  3. Display the form with the filled in submission, with renderMode set to html
  4. See error

Expected behavior The select component should display the label instead of the value, like it does when it's not in a conditionally displayed container

Screenshots Image

Additional context See this codepen for a demo of the bug https://codepen.io/Evan-Cook/pen/zxvxYMz

evancook11 avatar Jul 11 '25 16:07 evancook11

@evancook11 Thank you for reporting this. We have logged a ticket for the backlog. We are always willing to review any contributions to resolve this issue from the open source community.

For internal reference: FIO-10430

VikkiAlenn avatar Jul 17 '25 13:07 VikkiAlenn