-
Notifications
You must be signed in to change notification settings - Fork 132
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
Replace placeholder text with selected list item text on submit? #3
Comments
Could you give me an example? Edit: Thanks, I'm glad you like it! |
SOD don't display selected option on page load if there is placeholder configured. Maybe you should add empty option on beginning of select input in this scenario (but not displayed in sod) - this reflects first empty state. |
Well, @welly, it only took me 3 months. But after reading the comment from @PawelGIX I added a second placeholder option that will use the first |
I think I'm seeing this issue too, if you have a placeholder set (I'm using data-placeholder) and you load a element that already has a "selected" option, the placeholder is displayed instead of the selected option's value. I'm looking to see if I can figure out a workaround right now. |
@bryannielsen Thanks for the input. The thing is that a native As I wrote in the comment above I added a second placeholder setting that fixes this issue. But then you need to prepend your In this fiddle you'll see an example of how both settings works. The third one is using the placeholder alt.1 setting and if you fire up the console you'll see that the first option is the one selected. |
I'm closing this issue for now. Feel free to re-open if you don't feel that the second placeholder setting does the trick. |
@vestman thanks! This looks perfect. Sorry I read the description for the new placeholder option but it wasn't clear to me that it would fix this issue. Looking at your fiddle and your description above I think this should solve the problem. Thanks for the quick response and the awesome plugin! |
No problem, @bryannielsen, just let me know if you have any other questions. I'm glad you like the plugin! |
Fantastic widget! Thank you so much for your work on this.
I have a request, unless the functionality is there and I'm not using it correctly! When I use placeholder text, I've noticed when you submit a form, the placeholder text is showing in the select boxes rather than the selectors showing the previously selected list item. Is there a way of doing this?
Thanks!
The text was updated successfully, but these errors were encountered: