Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put form in popover using bootstrap framework?

What I want to do is put a simple form in popover,Now my popover was working fine, but it's not working when I put the form inside the popover.

here is my output

enter image description here

here is my code

<a href="#" class="btn" rel="popover" data-placement="bottom" data-content="
<form class='form-horizontal'>
<div class='control-group'>
<label class='control-label' for='inputEmail'>Start Date</label>
<div class='controls'>

<input type='text' class='span3 ' name='start_date' id='start_date' placeholder='News Date' value='<?php echo date('d-m-Y'); ?>' >
</div>
</div>
<div class='control-group'>
<label class='control-label' for='inputEmail'>End Date</label>
<div class='controls'>
<input type='text' id='end_date' name='end_date' placeholder='End Date' class='input-xlarge uneditable-input'>
</div>
</div>
</form>" title="Popover on bottom">         
</a>

here is the url who teach me did something like this Contain form within a bootstrap popover?

my bootstrap version was 2.2.2, any idea how to solve my problem? thanks

like image 335
Oscar Avatar asked Dec 16 '12 13:12

Oscar


1 Answers

You can set data-html="true" on the <a> tag that contains the popover

like image 124
PerfectlyNormal Avatar answered Oct 29 '22 19:10

PerfectlyNormal