Bootstrap Modal / Iframe

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Fri Aug 14, 2015 11:10 am
Reply with quote
Report this post
Hi Piotr,

I would like to use an iframe to return my booking form in this modal.

Could you advise on how to acheive this?

Thank you
Regards

References
Form:
http://www.quebecguitare.ca/admissions?tmpl=component

Frontend:
http://www.quebecguitare.ca/profs-admin ... oie-lepine

Backend:
http://www.quebecguitare.ca/administrat ... ingDetails

Bootstrap Code:

Code: Select all
<!-- BOOKING FORM MODAL -->
<!-- Button to trigger modal -->
<a href="#myModal" role="button" class="btn" data-toggle="modal"><i class="fa fa-youtube-play"></i>Launch demo modal</a>

<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header</h3>
</div>
<div class="modal-body">

<?php
$video = $this->fields->getFieldById(48);
if( isset($video) ) {
echo '<p />' . $video->getCaption();
echo ': ' . $video->getOutput(1);
}
?>

</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div>
</div>
User avatar
Platinum Boarder

teitbite
Mon Aug 17, 2015 11:06 am
Reply with quote
Report this post
Hi

Is there an instruction for this ? I cannot find anything and the code does not look right. For sure there can not be 2 buttons with the same ID "myModal".
User avatar
Moderator

GK User
Thu Aug 20, 2015 9:37 am
Reply with quote
Report this post
Hi Piotr, I reviewed the code, there was indeed some errors. I hope this will help you:

Code: Select all
$form = $this->fields->getFieldById(40);


//The output is a custom field value: http://www.quebecguitare.ca/admissions?tmpl=component
//The custom field can be located here: http://www.quebecguitare.ca/administrat ... cf&cfid=40

Code: Select all
<!-- BOOKING FORM MODAL -->
<!-- Button to trigger modal -->
<a href="myForm" role="button" class="btn" data-toggle="modal"><i class="fa fa-envelope-o"></i>Launch demo modal FORM</a>

<!-- Modal -->
<div id="myForm" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Modal header</h3>
  </div>
  <div class="modal-body">

<?php
$form = $this->fields->getFieldById(40);
     if( isset($form) ) {
     echo '<p />' . $form->getCaption();
     echo ': ' . $form->getOutput(1);
     }
?>
//The output is a custom field value: http://www.quebecguitare.ca/admissions?tmpl=component
//The custom field can be located here: http://www.quebecguitare.ca/administrator/index.php?option=com_mtree&task=editcf&cfid=40

  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    <button class="btn btn-primary">Save changes</button>
  </div>
</div>


Ref.: http://www.quebecguitare.ca/administrat ... ingDetails

Thank you Piotr,
Best Regards
User avatar
Platinum Boarder

teitbite
Sun Aug 23, 2015 9:50 am
Reply with quote
Report this post
Hi

Sorry, but You need to ask developers of this script. I cannot understand it at all. Why is it so complicated ;/ regular modal included in joomla is much easier to achieve. You will just need a one line of code, something like:

Code: Select all
<a class="modal" href="URL_TO_VIDEO">LINK_NAME</a>


so I hope You understand my confusion now.
User avatar
Moderator


cron