Search code examples
twitter-bootstrapradio-buttonpopover

Radio Buttons in a popover


Hi everyone i need help with a problem.

I have now a functional popover in a modal that shows me how many keys i have. i need to ad radio buttons in the popover that controlls the key status ( 1 2 3 ) is this possible?

This is the popover:

<button type="button" id="example" 
class="btn btn-default" data-container="body" 
data-toggle="popover" data-placement="right" 
data-content="Till detta skåp finns två nycklar." 
data-original-title="Nyckelstatus">
<img src="/resources/key_accept.png" />
</button>

This is in the viewmodel:

 $('#example').popover();

Thanks for all the help i can get.


Solution

  • This is how i fixed my own problem but thanks Nimmi for looking in to it :D

    <button type="button" id="example" class="btn btn-default" data-container="body"
    data-html="true"
    data-toggle="popover" data-placement="right"
    data-content="Till detta skåp finns två nycklar.
    &lt;div id='constcon-options-form' class='form-horizontal'&gt;
    &lt;input type='radio' name='keys' value='1' bind-value='key'&gt;
    1  &lt;br&gt;
    &lt;input type='radio' name='keys' value='2' bind-value='key'&gt;
    2  &lt;br&gt;
    &lt;input type='radio' name='keys' value='3' bind-value='key'&gt;
    3  &lt;/div&gt;"
    data-original-title="Nyckelstatus">
    </button>