Support

Account

Home Forums Bug Reports Ampersands in select box option prevent 'selected' attribute from being applied

Solved

Ampersands in select box option prevent 'selected' attribute from being applied

  • I’m populating a select box dynamically as per this tutorial. When one of the populated options contains an ampersand it renders correctly but after the post is saved the “selected” attribute is lost. The select box reverts to showing the null ” – Select – ” item.

    This seems to be a bug, but if it’s something I’m doing wrong then sorry for posting in the wrong area.

    Thanks.

  • Hi @joel_birch

    Can you check the field’s value and also the choices?

    Perhaps the ampersand is being converted to a special character which then does not match your value…

    Maybe you will need to change the ampersand in your choices, or allow for the special character recognition.

    Thanks
    E

  • Apologies for my ridiculously late reply, and thank you for your prompt one. I got around this issue by converting ampersands to the word “and”. Simple but effective.

    Thanks again, Elliot.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Ampersands in select box option prevent 'selected' attribute from being applied’ is closed to new replies.