Skip to content

Loading…

Req: Set defaults #708

Closed
msiemens opened this Issue · 2 comments

3 participants

@msiemens

I'm using the jQuery version of chosen and have not found a way, to set defaults. Would it be possible to set the defaults like e.g. for jQuery UI?

@dolen

I have the same problem, i don't know how should i set a default from the drop down using chosen.jquery.min.js

@tjschuck
Harvest member

Closing this in favor of #1387, a pull request to solve it. Any additional conversation should happen there.

@dolen I think your issue is a separate one. If you're just trying to set certain options as selected, just add the selected attribute to your option, like:

<select data-placeholder="Your Favorite Type of Bear" class="chzn-select">
  <option value=""></option>
  <option>American Black Bear</option>
  <option>Brown Bear</option>
  <option selected>Polar Bear</option>
  <option>Spectacled Bear</option>
</select>

The "Polar Bear" option will be selected by default.

@tjschuck tjschuck closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.