• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Dropdown element

  • Views Views: 26,460
  • Last updated Last updated:

Navigation

      Access element (+)
      Birthday element
      Button element
      Calculation element
      Captcha element
      Checkbox element
      Colour Picker element
      Count element (+)
      Database join element
      Date element
      Digg element
      Display text element
      Dropdown element
      Facebook Like element
      Field element
      File Upload element
      Folder element
      Google Map element
      Image element
         Image databese join
      Internal id element
      IP element
      J!Date element
      Kaltura element
      Link element
      Notes element
      OpenStreetMap element
      Picklist element
      Radio Button element
      Rating element
      Sequence element
      Slider element
      Tags element
      Textarea element
      Thumbs element
      Time element
      Timer element
      Timestamp element
      Total element
      User element
      User group element
      Video element
      View level element
      YesNo element
      Youtube element
      Akismet validation
      Is Email validation
      Is Not validation
      Is Numeric validation
      Not empty validation
      PHP validation
      Rsa id
  • Settings
    dropdown.png


    Sub Elements​

    • Add - Press this to add in a new drop down option
    • 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
    • Delete - Press this to delete the drop down option
    Note:You can reorder the sub Elements by clicking down on the grey bar to the left of the value field and dragging it within the list.

    Note: to create dropdown's with <optgroup>'s add a sub element with a value of '<optgroup>', the sub element label will be used as the dropdown optgroup heading. (since 25/11/2013)

    Options​

    • Multiple selections - if yes then uses can ctrl click to select multiple Options from the list
    • Multiple selections height - if multiple selections turned on then this value represents how many Options are visible in the list before you have to start scrolling it
    • Eval - evaluate the label as a PHP function.
    • Default - The default value to populate the element with. If the eval option is selected then this should contain a PHP statement

    Add Options​

    • 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​

    • Separator - to be completed
    • Eval Populate - Insert PHP code to build the Options. Should return an array of JHTML select Options. See sample below. Also on radio button element. Examples of use can be found there and below.
    • Eval - PHP Code to create Options, should return an array of JHTML select.Options. Get data from other Elements via $this->getFormModel()->data['table___element'] resp. $this->getFormModel()->data['table___element_raw']
    • Default - to be completed

    Sample Eval Populate

    Code:
    $Options[] = JHTML::_('select.option', '0', 'Please select' );
    $db = JFactory::getDbo();
    $db->setQuery("SELECT id, text FROM #__tablename");
    $rows = $db -> loadObjectList();
    foreach ($rows as $row) {
    $Options[] = JHTML::_('select.option', $row->id, $row->text);
    }
    return $Options;

    NOTE: Fabrik assumes the select IDs to be strings. Notice the first select option has the zero in quotes. Failing to do this will break the proper display of the value in a list view.
Back
Top