add modal or popup link to a themeler button

dpodesta
78 Posts
dpodesta posted this 23 April 2015

Hi

Is it possible to add a modal or popup link to a button?

I have added a couple of themeler buttons in the header.

Is there a way to add a modal or popup link to a button or do I need to add it as a html element?

Thanks

David

Hi Is it possible to add a modal or popup link to a button? I have added a couple of themeler buttons in the header. Is there a way to add a modal or popup link to a button or do I need to add it as a html element? Thanks David
Vote to pay developers attention to this features or issue.
32 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 23 April 2015

Hello David,
opening pop up window or modal window usually requires some JS coding. I believe that you may create a button or link in Themler but add custom code that opens a pop up/modal in the CMS back end.

Regards,
Aileen

Hello David, opening pop up window or modal window usually requires some JS coding. I believe that you may create a button or link in Themler but add custom code that opens a pop up/modal in the CMS back end. Regards, Aileen
dpodesta
78 Posts
dpodesta posted this 23 April 2015

so with html then, thanks.

so with html then, thanks.
Support Team
Support Team posted this 23 April 2015

Hi David,
you're welcome.
Please let us know if you need any further help.

Regards,
Aileen

Hi David, you're welcome. Please let us know if you need any further help. Regards, Aileen
ericfreget
8 Posts
ericfreget posted this 22 September 2015

Hello,
I tried to add a modal window in my onepage template but it appear and disapear and doesn't stay on screen.
here is the link :
http://tipi-com.com/J3/#fonctionalites

is there another way to have a modal window because it is a regular item with twitter bootstrap and save a lot of space on a webpage.

Thanks

Eric

Hello, I tried to add a modal window in my onepage template but it appear and disapear and doesn't stay on screen. here is the link : http://tipi-com.com/J3/#fonctionalites is there another way to have a modal window because it is a regular item with twitter bootstrap and save a lot of space on a webpage. Thanks Eric
Support Team
Support Team posted this 23 September 2015

Hello Eric,
although it is a pure coding task we'll try to help you.
Please provide more information:
1.what link should open a modal window on your page?
2.link to the article/post where you got the modal window code sample.

regards,
Aileen

Hello Eric, although it is a pure coding task we'll try to help you. Please provide more information: 1.what link should open a modal window on your page? 2.link to the article/post where you got the modal window code sample. regards, Aileen
Support Team
Support Team posted this 24 September 2015

Hi,
please refer to my response for topic
http://answers.themler.com/questions/29056/bootstrap-modal-link-does-not-work-the-way-it-should

regards,
Aileen

Hi, please refer to my response for topic http://answers.themler.com/questions/29056/bootstrap-modal-link-does-not-work-the-way-it-should regards, Aileen
Marco
171 Posts
Marco posted this 14 October 2015

The link is dead.
Ay hints on how to create a button with a modal window?

The link is dead. Ay hints on how to create a button with a modal window?
Support Team
Support Team posted this 14 October 2015

Hi Marco,

This topic was moved to Private.

The native bootstrap Modal feature works ok with Themler themes:
http://getbootstrap.com/javascript/#modals
You can add HTML control and insert the appropriate code inside. To use Themler default button simply use the following link:
<a class="bd-button" data-toggle="modal" data-target="#myModal"> Launch demo modal </a>

Thank you,
Olivia

Hi Marco, This topic was moved to Private. The native bootstrap Modal feature works ok with Themler themes: http://getbootstrap.com/javascript/#modals You can add HTML control and insert the appropriate code inside. To use Themler default button simply use the following link: `<a class="bd-button" data-toggle="modal" data-target="#myModal"> Launch demo modal </a>` Thank you, Olivia
Marco
171 Posts
Marco posted this 14 October 2015

i need to open a external website in this modal. how to do?

i need to open a external website in this modal. how to do?
Support Team
Support Team posted this 16 October 2015

Hi,

You can put the iframe inside "modal-body".

Thank you,
Olivia

Hi, You can put the iframe inside "modal-body". Thank you, Olivia
Stagger Lee
1818 Posts
Stagger Lee posted this 16 October 2015

Your code does nothing. Code from Bootstrap example open modal:

<button type="button" data-toggle="modal" data-target="#myModal">Launch modal</button>

And other their examples open modal. But position:fixed in overlay .modal-backdrop is making it not possible to click anywhere. Dont know why it is so.

Your code does nothing. Code from Bootstrap example open modal: <button type="button" data-toggle="modal" data-target="#myModal">Launch modal</button> And other their examples open modal. But position:fixed in overlay .modal-backdrop is making it not possible to click anywhere. Dont know why it is so.
Stagger Lee
1818 Posts
Stagger Lee posted this 16 October 2015

It is the same problem on Cloud, default theme. Just tested. Go to your Bootstrap link and click on demos, you wont experience this problem.

It is the same problem on Cloud, default theme. Just tested. Go to your Bootstrap link and click on demos, you wont experience this problem.
Stagger Lee
1818 Posts
Stagger Lee posted this 16 October 2015

Adding this helps, but no overlay anymore.

data-backdrop="false"

Adding this helps, but no overlay anymore. **data-backdrop="false"**
Stagger Lee
1818 Posts
Stagger Lee posted this 16 October 2015

Seems as they fixed it in 3.3.5 version. Just update your code in Themler default shiping to latest.

http://blog.getbootstrap.com/2015/06/15/bootstrap-3-3-5-released/

Seems as they fixed it in 3.3.5 version. Just update your code in Themler default shiping to latest. http://blog.getbootstrap.com/2015/06/15/bootstrap-3-3-5-released/
contact130
2 Posts
contact130 posted this 16 October 2015

Seems as they fixed it in 3.3.5 version. Just update your code in Themler default shiping to latest.

http://blog.getbootstrap.com/2015/06/15/bootstrap-3-3-5-released/

Hi, as I had the same problem here is the code I put in a html. If you have many modals windows to open watch out the ID otherwise you will open the same modal . Inside modal-body I call another article with "article anywhere" so it's where you can put your iframe.
see the attached file.

> Seems as they fixed it in 3.3.5 version. Just update your code in Themler default shiping to latest. > > http://blog.getbootstrap.com/2015/06/15/bootstrap-3-3-5-released/ Hi, as I had the same problem here is the code I put in a html. If you have many modals windows to open watch out the ID otherwise you will open the same modal . Inside modal-body I call another article with "article anywhere" so it's where you can put your iframe. see the attached file.

Last edited 16 October 2015 by contact130

Support Team
Support Team posted this 19 October 2015

Hi,

I've tested bootstrap modal on my side side before suggest anything. And this feature works ok on my side. Just do not open it in Themler. Themler Preview has its own peculiarities (layers with selection frames, etc.). If you need to see how it works simply make Live preview.

And other their examples open modal. But position:fixed in overlay .modal-backdrop is making it not possible to click anywhere. Dont know why it is so.

So, if overlay layer (.modal-backdrop) overlaps the whole page including modal window it's no good it needs to checked separately.

The only issue I see is the color of this layer.
You can fix this issue manually by adding the following code to the Themler Settings >> Additional CSS:

.modal-backdrop.in
{
opacity: 0.5!important;
}

Thank you,
Olivia

Hi, I've tested bootstrap modal on my side side before suggest anything. And this feature works ok on my side. Just do not open it in Themler. Themler Preview has its own peculiarities (layers with selection frames, etc.). If you need to see how it works simply make Live preview. > And other their examples open modal. But position:fixed in overlay .modal-backdrop is making it not possible to click anywhere. Dont know why it is so. So, if overlay layer (`.modal-backdrop`) overlaps the whole page including modal window it's no good it needs to checked separately. The only issue I see is the color of this layer. You can fix this issue manually by adding the following code to the Themler Settings >> Additional CSS: <pre> .modal-backdrop.in { opacity: 0.5!important; } </pre> Thank you, Olivia
Stagger Lee
1818 Posts
Stagger Lee posted this 19 October 2015

Olivia:

  • Open default WP theme on Cloud.
  • Insert HTML Control
  • Insert HTML code inside (from Bootstrap examples, your code doesnt work)
  • Go to the frontpage where modal is.
  • Click on button to open modal.

  • Modal opens but all is not clickable anymore. You cannot click anymore.

  • Do the same on Botstrap official website where examples are. Modal is clickable, beside modal, on close, etc...

Olivia: - Open default WP theme on Cloud. - Insert HTML Control - Insert HTML code inside (from Bootstrap examples, your code doesnt work) - Go to the frontpage where modal is. - Click on button to open modal. - Modal opens but all is not clickable anymore. You cannot click anymore. - Do the same on Botstrap official website where examples are. Modal is clickable, beside modal, on close, etc...
Support Team
Support Team posted this 19 October 2015

Ok.

modal-test.png

I can click all buttons and click outside modal window to close it.

Here is the code I'm using:

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
     </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

What am I doing differently?

Thank you,
Olivia

Ok. !modal-test.png! I can click all buttons and click outside modal window to close it. Here is the code I'm using: <pre> &lt;!-- Button trigger modal --> &lt;button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> Launch demo modal &lt;/button> &lt;!-- Modal --> &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> &lt;div class="modal-dialog" role="document"> &lt;div class="modal-content"> &lt;div class="modal-header"> &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close">&lt;span aria-hidden="true">&times;&lt;/span>&lt;/button> &lt;h4 class="modal-title" id="myModalLabel">Modal title&lt;/h4> &lt;/div> &lt;div class="modal-body"> ... &lt;/div> &lt;div class="modal-footer"> &lt;button type="button" class="btn btn-default" data-dismiss="modal">Close&lt;/button> &lt;button type="button" class="btn btn-primary">Save changes&lt;/button> &lt;/div> &lt;/div> &lt;/div> &lt;/div> </pre> What am I doing differently? Thank you, Olivia
Stagger Lee
1818 Posts
Stagger Lee posted this 19 October 2015

I see now what you are doing. Works this way on homepage.

Open Post template and insert same HTML Control under date, user, edit. Above Post image.
And you will se problem.

I see now what you are doing. Works this way on homepage. Open Post template and insert same HTML Control under date, user, edit. Above Post image. And you will se problem.
Support Team
Support Team posted this 20 October 2015

Aha! That's what you mean.
The issue happens when modal is located in content.
I've found this thread:
https://github.com/twbs/bootstrap/issues/16148
and this (resolves the issue above):
https://github.com/twbs/bootstrap/pull/16432

Looks like the fix is planned on bootstrap 4.
At least changing bootstrap version is not working for me.
The problem is that modal parent should have specified positioning and z-index to make everything work properly.

Anyway, the best solution that I found is to add the modal itself somewhere outside content (before footer, for example).

Thank you,
Olivia

Aha! That's what you mean. The issue happens when modal is located in content. I've found this thread: https://github.com/twbs/bootstrap/issues/16148 and this (resolves the issue above): https://github.com/twbs/bootstrap/pull/16432 Looks like the fix is planned on bootstrap 4. At least changing bootstrap version is not working for me. The problem is that modal parent should have specified positioning and z-index to make everything work properly. Anyway, the best solution that I found is to add the modal itself somewhere outside content (before footer, for example). Thank you, Olivia
You must log in or register to leave comments