0

I have an Active Directory. I am creating a forms page in bootstrap. As I type in a portion of the name, I want the text box to come up with suggestions. For e.g. if I type in Al, it should show Alan, Alice, Alex in a combo style box below and I can select the same using a mouse click. The names come from the Active Directory.

I googled a fair bit, but perhaps I am missing something. If bootstrap + LDAP is not the right technology stack for this, what other lightweight web based options do I have? I can't use C# or Java.

Siguza
  • 21,155
  • 6
  • 52
  • 89
Fanatic23
  • 3,378
  • 2
  • 28
  • 51
  • There are libraries in angularjs which support auto suggestion which you can merge with bootstrap textbox to make it autocompletion box – shreyansh May 31 '15 at 05:37

1 Answers1

0

This code may be helpful for you i am using datalist tag.

      <body>
      <div class="container">
            <div class="row">
                <form class="form-horizontal" style="margin-top:10%;">

                      <div class="form-group has-success">
                            <label for="country" class="col-sm-2 control-label">Select Country</label>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" list="countryname" name="country">
                                  <datalist id="countryname">
                                    <div> 
                                      <option value="India">
                                      <option value="France">
                                      <option value="Germany">
                                      <option value="Poland">
                                      <option value="Indonesia">
                                      <option value="USA">
                                      <option value="UK">
                                      <option value="Afghanistan">
                                      <option value="Denmark">
                                      <option value="Finland">    
                                      <option value="Greece">
                                      <option value="Greenland">
                                      <option value="Greenland">
                                      <option value="Greenland">
                                      <option value="Greenland">
                                    </div>   
                                  </datalist>
                            </div>
                      </div> 

                      <div class="form-group has-success">
                        <div class="col-sm-offset-2 col-sm-10">
                          <button type="submit"  class="btn btn-success">Submit</button>
                        </div>
                      </div>
                </form>
            </div>    
      </div>  
  </body>

The combobox works exactly as autocompletion box.

shreyansh
  • 1,637
  • 4
  • 26
  • 46
  • This information is all coded statically. What I am looking for is tying up Active Directory with Bootstrap as I type. – Fanatic23 May 31 '15 at 06:49
  • You can use angularjs ng-repeat or ng-option to bring your data from a service, or store your directory inside controller. – shreyansh May 31 '15 at 07:16