From Dropdown to lightbox?

galbur 01 Feb, 2013
Hi

To have a Form in a Lightbox works very fine with the following code:
<?php
JHTML::_('behavior.modal'); 
?>
<a class="modal" href="index.php?option=com_chronoforms&chronoform=test&tmpl=component" rel="{handler: 'iframe', size: {x: 850, y: 650}}">test</a>


Thanks for the tutorial.
I have different forms and it would be nice to select them in a dropdownmenu to open it in lightbox. But i was not able to build a dropdown. Any idea?

Thank You
Chris
GreyHead 09 Feb, 2013
Hi Chris,

I've no real idea. I guess that you could use JavaScript to open the modal window when the drop-down changes?

Bob
FloB 26 Feb, 2013
Hello!

If you can't have the form loaded on change of the dropdown, you could certainly have it loaded after a submit.
You have a table called #_chronoforms in your data base which store the forms
[list]Put a multi record loader in the on load event, and configure it to have the name from the table #_chronoforms[/list]
[list]Put a drop down in the preview with dynamic data enable with data path = the name you give to your modelID, value key=text key = name[/list]
[list]Put a submit button in the preview[/list]
[list]Put an action 'Show form' in the on submit event[/list]

Here I can't help anymore, as I don't known how to give the value of the dropdown to the show form action. I think a custom code is needed but I don't know the syntaxe.
I know the syntaxe for changing the upload path of the upload file action, so I guess there is something like it for the show form action...
Maybe GreyHead or some expert could help...
This topic is locked and no more replies can be posted.