1. The 3.8 code for Fabrik is now available on github, in the 'master' branch. If you are familiar with updating Fabrik from github, we would appreciate it if you could test this code on J! 3.8 for us. Once we have some feedback, we'll build a 3.8 release.

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.


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

    return '{tablename___elementname}';
    Get a filter value

    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)

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