Forums

modal window

chrissy6930 25 Mar, 2015
hi all,

I would like to add view links to my list of entries using modal following this FAQ:
https://www.chronoengine.com/faqs/56-cfv4/cfv4-other-faqs/2680-how-can-i-show-a-form-in-a-lightbox.html

in designer - custom element I have:
<div class='cf_eview'><a href='{$view_url}' >##VIEW##</a></div>

the view link is being displayed and opens the desired form
adding this at the top:
<?php JHTML::_('behavior.modal');  ?>

and adjusting the above snippet to
<div class='cf_eview'><a class='modal' href='{$view_url}' >##VIEW##</a></div>

the view link is not being displayed any longer and the html shows:
<a class="modal" href="../index.php?option=com_chronoforms5&chronoform=viewEntries&token=b9da4ad08cec99add138d1204746e14183e50045">View</a>

but there is no error
if I now try adding the handler:
<div class='cf_eview'><a class='modal' href='{$view_url}' rel='{handler: \"iframe\", size: {x: 600, y: 600}}'>##VIEW##</a></div>

the html I get is:
<a class="modal" rel="{handler: "iframe", size: {x: 600, y: 600}}" href="http://gabriela.family-huber.net/index.php?option=com_chronoforms5&chronoform=viewEntries&token=b9da4ad08cec99add138d1204746e14183e50045">View</a>

but there is still no edit link and no error

does anybody have any ideas how to get this to work?

best regards
Gabriela

p.s.: error reporting (system) is enabled, debugger (CF5) is in place
GreyHead 30 Mar, 2015
Hi Gabriela,

I suspect that what is happening here is that ChronoForms is trying to replace the {} with variable names. I recall that we had this question before and the fix then was to replace { and } with the HTML entities { and }

Bob
chrissy6930 30 Mar, 2015
Hi Bob,

adjusting the snippet to
<div class='cf_eview'><a class='modal' href='{ $view_url}' rel='{ handler: \"iframe\", size: { x: 600, y: 600}}'>##VIEW##</a></div>

makes the html look like this:
<a class="modal" rel="{ handler: "iframe", size: { x: 600, y: 600}}" href="{ http://gabriela.family-huber.net/index.php?option=com_chronoforms5&chronoform=viewEntries&token=b9da4ad08cec99add138d1204746e14183e50045}">View</a>

thus no change in html
and there is still no view link

best regards
Gabriela
GreyHead 22 Apr, 2015
Hi Gabriela,

I got a Modal Window to work from a form Please see this FAQ. The problem was that Max has some ChronoForms CSS that hides links with the class='modal' so I had to over-ride this.

Bob
This topic is locked and no more replies can be posted.