Daemonite / material

Material Design for Bootstrap 4
http://daemonite.github.io/material/
MIT License
3.2k stars 720 forks source link

Form in popover #170

Closed djibe closed 4 years ago

djibe commented 6 years ago

Hi Maya, sorry for my daily bug report, but I am incapable of creating a simple text input input (or textarea) inside a popover.

$('[data-toggle="popover"]').popover({
  html: true,
  content: '<form><div class="form-group"><label for="exampleInputEmail1">Email address</label> <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email"><small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small></div></form>'
});

I also tried to place it in a div and call content: $('#myDiv').html().

Thank you again

sesemaya commented 6 years ago

Probably because the ' in We'll, it needs to be escaped.

djibe commented 6 years ago

Still not working even with simplest input

$('[data-toggle="popover"]').popover({
  html: true,
  content: '<div class="form-group"><input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email"></div>'
});
sesemaya commented 6 years ago

@djibe

The code works for me.

vaishnavmhetre commented 6 years ago

@djibe, can you tell what the console says if you aren't able to implement it?