1. If you update to Joomla 3.8.10, please make sure that you either do a full GitHub update of Fabrik, or disable caching for your lists (in the Advanced settings) or turn off Joomla's System Cache setting. A change in Joomla's cache code in 3.8.10 required a fix in Fabrik, which will be rolled in to the next release, but is currently only available in GitHub.
    Dismiss Notice
  2. We will be performing an update of XenForo (the forum software use on this site) this afternoon, Fri 8/17/2018. The forums will be unavailable for a (hopefully!) short time.
    Dismiss Notice

Element default examples

Mar 6, 2016
Element default examples
  • Many elements have both a "default" option and an "eval" option.
    When you turn on "eval", the text entered in the "default" option is treated as PHP.
    The PHP expression is evaluated and the data 'returned' is used as the element's default value.

    PHP:

    return 'a string';
     
    Using placeholders....
    PHP:

    return '{tablename___elementname}';
     
    Get a filter value
    PHP:

    return FabrikHelperElement::filterValue(81); //81 is the id of the filter element
     
    Insert a URL parameter (e.g. to set the default of a non-writable element, which can't be set for security reasons directly via URL)
    PHP:

    $myInput = JFactory::getApplication()->input;
    $myParam = $myInput->get('urlparam','');
    return $myParam;
     
nettemor and tagger like this.