How to open a form in a pop up

I've not tested this, but presuming you have the fabrik system plugin published, you would first have to assign a class name to your link:

Code:
<a href="site.com" classs="myFabWin" rel="{'title':'my link rocks'}">My Link</a>

then in your Joomla template add this:

PHP:
FabrikHelperHTML::framework();
FabrikHelperHTML::mocha('a.myFabWin');
 
thinking about it the mocha() call should be depreciated, so whilst it will work, its probably bes: updating from github as I just added this and then doing:

PHP:
FabrikHelperHTML::framework();
FabrikHelperHTML::windows('a.myFabWin');
 
Thanks Rob.
Basically it is working, but there are an issue if you have a date field with a date picker : you get a JS error : calendar is not defined.

Although, the opened window has "Recherche avanc?e" as title. Is it possible to give a custom name ? And is it possible to set a width and height ?

Finally, you have to add "&tmpl=component" to the link if you want to open just the form in the window.
 
ah there was a bug where the options defined in the link's rel attribute were not overriding the default ones. Now this should work

I've added a wiki page explaining the various options:

http://fabrikar.com/forums/index.php?wiki/javascript-window-class/

For what you are doing, its probably best to load with the iframe loadmethod, if a fabrik form is loaded via ajax its expecting fabrik to have called it (hence the warning about the missing calendar script)
 
if i were using another pop up window, is there a way to retain the css styling of the form?

for example, using modalizer plugin code:
Code:
{modal url=index.php?option=com_fabrik&view=form&formid=9&Itemid=155&tmpl=component|width=628|height=478}my link{/modal}
loads the forms contents without any styling applied to it.

thank you!
 
thanks, i tried:

Code:
{modal url=index.php?option=com_fabrik&view=form&formid=9&Itemid=155&layout=default|width=628|height=478}my link{/modal}

but no dice. by 'your-form-template' i'm assuming i could just add 'default'?
 
I've not tested this, but presuming you have the fabrik system plugin published, you would first have to assign a class name to your link:

Code:
<a href="site.com" classs="myFabWin" rel="{'title':'my link rocks'}">My Link</a>
then in your Joomla template add this:

PHP:
FabrikHelperHTML::framework();
FabrikHelperHTML::mocha('a.myFabWin');

How can I close the window once opened ?

Thank
 
thanks, i tried:

Code:
{modal url=index.php?option=com_fabrik&view=form&formid=9&Itemid=155&layout=default|width=628|height=478}my link{/modal}
but no dice. by 'your-form-template' i'm assuming i could just add 'default'?

I know this is old, but I am in the process of working on just this type of thing. With regards to your template issue, see the FAQ on the nonumber site, this solved it for me.

https://www.nonumber.nl/extensions/modals#the-modal-does-not-have-the-correct-styling
 
Hello Achartier.
I'm a Nonumber Modals fan; as well. Could I trouble you for more info on how you used NoNumber Modals with Fabrik? I would like to use the Nonumber Modal popup; instead of using the Fabrik Form / detail AJAX popup when a user clicks on a record in a Fabrik list. Is this implemented on the Fabrik List Links tab somehow?
Thanks in advance.
 
Thanks for the link Achartier; but your correct. This seems like much more info than I need. I'm trying to find all I need for what I'm doing; but I'm getting a bid lost in the details. Is there any way you can share the basic suggestion / implementation for what I'm asking? I really appreciate it.
Thanks in advance.
 
Well, I think the details above in rw1's post are correct. Maybe if you place your model in the custom link field of the list view settings of the element you want the popup on. You have access to the placeholders at that point.
 
Thanks for the tip Achartier. I'm still a bit lost on what to put where. Also, I'm noticing something strange with the Fabrik list links tab settings. When I add anything to the custom edit URL setting and then test it seems to just add this to the complete edit form link (instead of replacing it). I'm starting to wonder if it would be easier to just add an element button to my list and then add the a link to the button. If so; could I trouble you for some suggestions or a breakdown on how to create the link including what placeholders?
Thanks in advance.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top