-
"Fabrik 4" helpers needed!Dismiss Notice
You are invited to join other community members active in coding, maintaining and improving Fabrik. Please visit https://fabrik.help for more information!
Button element
-
Contents
Introduction(top)
Creates an html <button> in form view (does not display in list view).
The button text is derived from the label setting, and javascript actions can be added from within the Javascript tab.
Note that a submit button is automatically added to the form, so creating an element to do the same function is not required.
Options(top)
- Bootstrap class - Button class to assign.
- Bootstrap icon - E.g. 'icon-user'. Places a bootstrap icon inside the button
Bootstrap icons(top)
Bootstrap reference (http://getbootstrap.com/components/) shows icons, but they are not all included in Joomla Bootstrap.
- Protostar template includes some Glyphicons
- Joomla includes Icomoon. (List at http://kyleledbetter.com/jui/icons/)
Icomoon will look better on high pixel density smartphones displays.
Examples (top)
Link to URL. Add a Javascript event on 'click', which does
Code (Javascript):
window.location.href = 'your.url';
Code (Javascript):
window.open ('your.url');
Another example from Hugh(top)
From this forum post. To get a URL from another element called some_element and open it in a new window.
Code (Javascript):
var url = form_123.formElements.get('yourtable___some_element').getValue();
window.open(url);
Code (Javascript):
window.location.replace(url);
For Fabrik 3.1 this would be(top)
Code (Javascript):
var url =Fabrik.getBlock('form_123').formElements.get('yourtable___some_element').getValue();
window.open(url);
- Loading...
XenCarta PRO
© Jason Axelrod from 8WAYRUN.COM