Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'select multiple' values not selected in api browser #3290

Closed
leeahoward opened this issue Aug 18, 2015 · 5 comments
Closed

'select multiple' values not selected in api browser #3290

leeahoward opened this issue Aug 18, 2015 · 5 comments
Labels
Milestone

Comments

@leeahoward
Copy link

I believe that the issue is in the select_multiple templates.

I changed the '==' to 'in' and that seemed to fix it.

<option value="{{ select.value }}" {% if select.value == field.value %}selected{% endif %}>{{ select.display_text }}</option>
<option value="{{ select.value }}" {% if select.value in field.value %}selected{% endif %}>{{ select.display_text }}</option>
@leeahoward leeahoward changed the title select multiple' values not selected in api browser 'select multiple' values not selected in api browser Aug 18, 2015
@tomchristie tomchristie added this to the 3.2.3 Release milestone Aug 19, 2015
@tomchristie
Copy link
Member

Good catch - thanks!

@tomchristie
Copy link
Member

Example for future reference...

This user:

image

Should render with this form field:

image

Currently neither option is initially marked as selected.

@jness
Copy link

jness commented Sep 18, 2015

When using the 'in' operator we can get false positives it seems:
https://gist.github.com/jness/2773ea77acc761bb4328

@zhenfeng-cao
Copy link

I found in the latest version that I cannot deselect if there is only one option in the list...

@auvipy
Copy link
Member

auvipy commented Jan 11, 2023

can you send an improvement request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants