1. Fabrik 3.7 is now available. This version contains critical security updates, please update as soon as possible. Please remember to backup your site before updating, we also recommend testing your updates on development sites if possible.
  2. We had to restore the site around midday (CST) on Wed 7/26 from a backup approximately 8 hours old. So a few posts in the forums were lost. You may want to check to see if you need to re-post anything.
  3. The release of Fabrik for J! 3.8 is not yet ready. Do not update your sites to J! 3.8 until this notice is removed.

Radio Button element

Mar 26, 2017
Radio Button element

  • Introduction(top)

    Renders a a series of radio input options.

    Details Tab(top)

    Options (top)

    • Sub Options - The list of options for the radio buttons. Use the green + to add more, the red - to remove options and the grey boxes on the right to drag and drop to change the order.
      NOTE: options can be programmatically added to this list using Eval Populate on the Advanced tab.
      • Value - The value that is stored in the database if the drop down option is selected.
      • Label - The label that appears next to the drop down option. Equally this label is shown in the table view rather than the recorded value (which is stored in the database table itself)
      • Default - is the option selected as default
    • Options per row - Specify the number of columns used to render the radio buttons. A smaller number will place the options FARTHER apart. If you have short options, then choosing a number like 8 would help move the options closer together without as much whitespace between them.
    • Button group - Renders the options as a bootstrap 'button group' vs. the traditional html radio buttons (a button group is similar to the No/Yes choice of button group).
      • Button groups work only on Joomla 3 (with bootstrap)
      • If you use javascript events, you have to use a click event (and not the change event).

    Front End Addition (top)

    • Allow user to add drop down option - Allow your form's users to add in additional options to your form.
    • Only add label - If no selected then the user has to enter both a value and a label for the checkbox option they are adding. If yes selected then only a label field is presented to the user the value of which is then used for the value and label.
    • Save new additions - If yes selected then the newly submitted option is stored by the element, meaning subsequent users of the form will be able to select the same value.

    Advanced Options(top)

    • Eval Populate - PHP that can generate a list of options to add to list added using JHTML.
      For example, here is some code that will build a list of years from the current year and the previous 10 years. The 'if' that marks LAST year as the default/selected year in this case. This is handy if you need a list of years that will change over time automatically. (note that this same field is available on the dropdown list element too).
      for ($year = date('Y'); $year > date('Y', strtotime('-10 years')); $year--)
        $options[] = ($year == date('Y', strtotime ('-1 year')))
              ? JHTML::_('select.option',$year,$year,'SELECTED')
              : JHTML::_('select.option',$year,$year);
      return $options;

    Additional data(top)

    Sometimes, when editing a record, you may see sub-options appearing that are not listed in the element's admin page. This is because the current record has values that are not found in the sub-options. This could occur because:
    • Data was entered manually into the database
    • Data previously entered from a radio sub option that has been subsequently deleted
    • The user has been allowed (possibly at some point) to add their own options but not set to store that added option as a option available to other users.
    With Fabrik we work on the principle of trying to be as lenient as possible with the data stored/displayed. If someone has entered it in, we will try to to produce processes where it will be not removed.
  • Loading...