Dropdown Button and login form

5 replies·opened Dec 11, 2017
W
web404Dec 11, 2017

temp "menu-7.html" have login form on hover:

			<!-- Top Links
					============================================= -->
					<div class="top-links">
						<ul>
							<li><a href="index.html">Home</a></li>
							<li><a href="faqs.html">FAQs</a></li>
							<li><a href="contact.html">Contact</a></li>
							<li><a href="login-register.html">Login</a>
								<div class="top-link-section">
									<form id="top-login" role="form">
										<div class="input-group" id="top-login-username">
											<span class="input-group-addon"><i class="icon-user"></i></span>
											<input type="email" class="form-control" placeholder="Email address" required="">
										</div>
										<div class="input-group" id="top-login-password">
											<span class="input-group-addon"><i class="icon-key"></i></span>
											<input type="password" class="form-control" placeholder="Password" required="">
										</div>
										<label class="checkbox">
										  <input type="checkbox" value="remember-me"> Remember me
										</label>
										<button class="btn btn-danger btn-block" type="submit">Sign in</button>
									</form>
								</div>
							</li>
						</ul>
					</div><!-- .top-links end -->

how can use login form like this separately. i have link and on hover it will be login form, or i have Bootstrap Dropdown Buttons and on click it will be login form

S
SemiColonWebSTAFFDec 11, 2017

Hello,

You can consider using the Popover/Modals Element: http://themes.semicolonweb.com/html/canvas/modal-popovers.php . If you plan to use the Popover Element, make sure that you are adding the data-html="true" Attribute to the Popover Element.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

W
web404Dec 12, 2017

i didn't untested how can i do that in Popover Element was login form :(

S
SemiColonWebSTAFFDec 13, 2017

Hello,

Consider using the following code:

<button type="button" class="btn btn-default" data-container="body" data-html="true" data-toggle="popover" data-placement="right" data-content='<form id="top-login" role="form">
	<div class="input-group" id="top-login-username">
		<span class="input-group-addon"><i class="icon-user"></i></span>
		<input type="email" class="form-control" placeholder="Email address" required="">
	</div>
	<div class="input-group" id="top-login-password">
		<span class="input-group-addon"><i class="icon-key"></i></span>
		<input type="password" class="form-control" placeholder="Password" required="">
	</div>
	<label class="checkbox">
	  <input type="checkbox" value="remember-me"> Remember me
	</label>
	<button class="btn btn-danger btn-block" type="submit">Sign in</button>
</form>' data-original-title="" title="">Popover on right</button>

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

W
web404Dec 14, 2017

this work and thank you , but i want add this form in this dropdown-toggle btn

						<div class="btn-group">
							<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
							<ul class="dropdown-menu" role="menu">
								<li><a href="#">Action</a></li>
								<li><a href="#">Another action</a></li>
								<li><a href="#">Something else here</a></li>
								<li class="divider"></li>
								<li><a href="#">Separated link</a></li>
							</ul>
						</div>

i do it like this

<div class="btn-group">
							<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
							<ul class="dropdown-menu" role="menu">
								<li>

<form id="top-login" role="form">
    <div class="input-group" id="top-login-username">
        <span class="input-group-addon"><i class="icon-user"></i></span>
        <input type="email" class="form-control" placeholder="Email address" required="">
    </div>
    <div class="input-group" id="top-login-password">
        <span class="input-group-addon"><i class="icon-key"></i></span>
        <input type="password" class="form-control" placeholder="Password" required="">
    </div>
    <label class="checkbox">
      <input type="checkbox" value="remember-me"> Remember me
    </label>
    <button class="btn btn-danger btn-block" type="submit">Sign in</button>
</form>

</li>
							</ul>
						</div>

but i is not good visible , seeattachment

S
SemiColonWebSTAFFDec 15, 2017

Hello,

You can consider using the following code but this will not work correctly as forms are not supported inside the Bootstrap Dropdown component:

<div class="btn-group">
	<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
	<ul class="dropdown-menu" role="menu">
		<li>
			<div style="width: 250px; padding: 20px;">
				<form id="top-login" role="form">
					<div class="input-group" id="top-login-username">
						<span class="input-group-addon"><i class="icon-user"></i></span>
						<input type="email" class="form-control" placeholder="Email address" required="">
					</div>
					<div class="input-group" id="top-login-password">
						<span class="input-group-addon"><i class="icon-key"></i></span>
						<input type="password" class="form-control" placeholder="Password" required="">
					</div>
					<label class="checkbox">
					  <input type="checkbox" value="remember-me"> Remember me
					</label>
					<button class="btn btn-danger btn-block" type="submit">Sign in</button>
				</form>
			</div>
		</li>
	</ul>
</div>

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard