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 'required' parameter not working #514

Closed
navilink opened this issue Mar 13, 2014 · 20 comments
Closed

Select 'required' parameter not working #514

navilink opened this issue Mar 13, 2014 · 20 comments

Comments

@navilink
Copy link

Without the styling, it will prompt 'Please fill in this field'. But when style it, the 'required' parameter doesn't work.

@justintoth
Copy link

+1

@t0xicCode
Copy link
Collaborator

Could you create a jsfiddle for this?

@maguagua
Copy link

+1

@kieste
Copy link

kieste commented Oct 13, 2014

@rwyland
Copy link

rwyland commented Jan 9, 2015

+1

1 similar comment
@matiaslabra
Copy link

+1

@navilink
Copy link
Author

Sorry for super late reply. Here's the jsfiddle simple example: https://jsfiddle.net/adtu3zv8/

Chrome 43: Doesn't popup "Please select item.."
Firefox 38: Popup "Please select item.." but not positioned at the select but on top-left most of the window

@caseyjhol caseyjhol self-assigned this Jun 15, 2015
ashleydw added a commit to 3floorsup/bootstrap-select that referenced this issue Jul 13, 2015
* Keep select visible but behind the newly created div

refs snapappointments#514
ashleydw added a commit to 3floorsup/bootstrap-select that referenced this issue Jul 13, 2015
* Keep select visible but behind the newly created div

refs snapappointments#514
@ashleydw
Copy link

I'm interest to hear what people make of the method I have used and have suggestions/ideas of alternatives. I have only managed to do this by making the multiselect div overlay the original element (which remains visible in the dom but opacity:0, aria-hidden and beneath the new element), thus allowing the HTML5 required browser tooltip to be displayed.

This works in chrome but is untested in other browsers. Commit of interest: 3floorsup@51a1b58

(My fork contains other fixes which aren't related to this issue)

@injaon
Copy link

injaon commented Jul 15, 2015

I've the same problem. Is there a solutions for this?

@cyberjar09
Copy link

I'm using @ashleydw's fork. Works fine for me. Why is this not integrated as a pull request?

@5minpause
Copy link

@ashleydw's fork works for me as well. Splendid commit.
You should open a PR @ashleydw (I checked and couldn't find your commit as a PR).

@dmolineus
Copy link

When is the next release planned which would integrate this bugfix?

@ARS81
Copy link

ARS81 commented Jan 28, 2016

It seems buggy again in Chrome :(
http://codepen.io/anon/pen/NxMMPW?editors=1000

Works OK in latest Firefox, Edge..

@root91
Copy link

root91 commented Apr 27, 2016

hey everyone! U can easily fix it with css:

.btn-group.bootstrap-select select {
width: 1px !important;
}

opacity is set 0 and position absolute will hide your original select but u will see the warning.

@EcoFreak
Copy link

EcoFreak commented Jan 2, 2018

This does not work for Internet Explorer right?

I'm getting problems with users using IE11.

Any thoughts?

@TCOA
Copy link

TCOA commented Apr 27, 2018

@root91 - you deserve more than a thumbs up! :) easy patch (would prefer it in the main program) and works great - thanks!

@dinukasal
Copy link

hey everyone! U can easily fix it with css:

.btn-group.bootstrap-select select {
width: 1px !important;
}

opacity is set 0 and position absolute will hide your original select but u will see the warning.

saved my time :D

@caseyjhol
Copy link
Member

This seems to work fine for me using the latest version of bootstrap-select. If somebody can show me an example of it not working, I'll reopen the issue.

@ppazos
Copy link

ppazos commented Mar 9, 2020

@caseyjhol tried 1.13.12 on FF 66.0.3 Linux and "required" is not working.

I'm styling the select to match bootstrap's default theme:

.bootstrap-select {
      width: 100% !important;
    }
    .bootstrap-select .status { /* fix to the status vertical position */
      margin-bottom: -8px !important;
      margin-top: 3px !important;
    }
    .bootstrap-select > .btn.dropdown-toggle { /* make bootstrap select look like normal */
      background-color: white;
      border: 1px solid #ced4da;
    }

Also tried @root91 CSS but didn't work:

.btn-group.bootstrap-select select {
      width: 1px !important;
    }

@ppazos
Copy link

ppazos commented Mar 20, 2020

It seems the selectpicker ajax extension is breaking the required

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

No branches or pull requests