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 · 3 comments
Closed

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

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

Comments

@leeahoward
Copy link

leeahoward commented Aug 18, 2015

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

tomchristie commented Aug 20, 2015

Good catch - thanks!

@tomchristie
Copy link
Member

tomchristie commented Aug 20, 2015

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

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

3 participants