1. Fabrik 3.5.2 is now available to download. Read the blog for highlights about this release.

    As always, please back up your site prior to updating and if possible test in a dev environment first.

    Also, our 3.5.1 package file was hacked, the effected dates were 1/15/2017 - 1/17/2017. If during those days you downloaded the 3.5.1 package file from the JED or our site download page, please re-install the package with a fresh copy or upgrade to Fabrik 3.5.2. Github downloads were not effected.

Forms

Aug 10, 2016
Forms

  • Introduction (top)


    Forms are the heart of Fabrik, they allow you to collect data from users to access your data for editing and viewing.

    List Available Forms (top)


    To access the form's section select components->fabrik->forms. You will see a page containing a list of your forms similar to the diagram below:

    forms.png

    Filtering

    From here you should see a table of all the forms in your system. There are ways to filter this table by using the following:

    • #- This is the ID of the form. You can order this by ascending to descending, and vice versa.
    • Label- This is the name of the form. You can order this from A-Z, or Z-A.
    • Published- This tells you which forms are published or unpublished. A green "checkmark" indicates that the form is published, a red "x" indicates that the form is unpublished.
    Furthermore you can select which forms to view, based on their publishing status (all,published, unpublished, trashed) by selecting the options in the drop down menu to the right of the page.

    Add / Edit Form Basic Settings (top)


    Each form can be selected with the check box to the left of its name. Once selected it can be altered by clicking on the buttons in the top sub-menu.
    • New - Creates a new form.
    • Edit - Edits the selected form. (note that you can also edit the form by clicking on its name)
    • Publish - Sets the state of the form to published.
    • Unpublish - Sets the form state to unpublished.
    • Check In - Checks in the form.
    • Trash - Trashes the form.
    • Options - Is the general Fabrik Options area.
    • Help - Links to the related Fabrik wiki article.

    Form Details (top)


    You will need to create a new form or edit an existing form to view the form details interface.

    form-details.png


    • Label - The form's title which appears at the top of the form.
    • Introduction - This text appears under the form label and is used to let you introduce the form to your users. You have a couple of special placeholders here:

      Code (Text):
      {new: here is a new form}
      {edit: we are editing a form!}
      {details: here are the details for [mytable___name]}
       
    • The appropriate text is inserted when the form is respectively a new entry, editing an existing entry or looking at a details view
    • If you need to use element placeholders within the special new/edit/details placeholders, use [foo___bar] square brackets rather than curly brackets (you can't nest braces for placeholders)
    • Error message - This text appears at the top of the form, if it fails validation. It should be used to explain to the user that an error has occurred and the steps to take to remedy the error.
    • Footer text - Text appearing at the bottom of the form. The same special placeholders as for the introduction area can be used see this forum page for info on how to use it in conjunction with the joomla content plugin

    Buttons (top)


    Your form has button options in regards to form submission, saves, previous page, next page, etc.

    form-buttons.png

    • Reset Button - If yes selected shows a reset button at the bottom of the form. When pressed the form's fields revert back to their initial states.
    • Reset Button Label - The text displayed in the reset button.
    • Copy Button - Adds a copy button to the bottom of the form. If editing an existing record, this button will save the data as a new record. When adding a new record this button has the same effect as the save button.
    • Copy Button Label - The text displayed in the copy button.
    • Back Button- Adds a go back button to the bottom of the form, when pressed this button takes you back to the previous page without saving or submitting the form.
    • Back Button Label - The text displayed in the go back button.
    • Apply Button- Adds an apply button to the bottom of the form, allowing the user to save the record and return back to the form to continue editing it.
    • Apply Button Label- The text displayed in the apply button.
    • Delete Button - Adds a delete button to the page, allowing the user to delete the records. The form must save to a database table and the user must have delete access rights (defined in the form's list)
    • Delete button label - The delete button's text.
    • Submit Button- The text displayed in the submit/form entry button.
    • Submit Button Label- The text displayed in the submit button (Submit buttons are always shown at the bottom of the form).
    • Submit on Enter - If set to yes then the form will be submitted when a field is focussed and the keyboards enter key is pressed. Note that some focussed fields will not trigger the submit, including text areas and select lists.

    Form Processing (top)


    Basic form processing options.

    form-processing.png

    • Record in Database - If ticked the then form saves the data into a database table.
    • Table Name - If editing a form this shows you the table that the form is saving to. If creating a new form this is a field into which you can enter the name of the database table that you want to save the form's data to. The table is created in the database defined by the default connection. This table name must not exist already.
    • Ajax Validation - If 'yes' selected then each element is validated as its data is changed. Validation occurs on the server, so is more secure than simple JavaScript validation. Feed back on success or failure of the validation is shown next to each element as a real time animated effect. Note whether set to 'yes' or 'no' validation will always occur when the form is submitted.
    • Success Message - The message shown when the form has been successfully submitted. If left blank the default success message will be shown
    • Suppress Messages - Suppreses all success messages
    • Spoof Check - If set to no this will remove Joomla's spoof check from the form, this makes the form less secure but allows for posting data into the table directly from a URL.
    • Save Partially Completed Multi-Page Forms - If you use a multipage form (by turning on one of your groups' 'Page break' options), and this setting is set to 'Yes' then a cookie will be set on the computer so that if the form is not completed and the user comes back to add a record, the user will be returned to the last page they were editing. Turn this setting off if the form is likely to be used in a public place where several people will share the same computer
    • Notes - This is an administration feature which allows you to make a note about the form. The content of this note is shown as a tool tip when you hover over the form's name in the form list.

    Publishing (top)


    The publishing tab allows you to specify certain attributes of the form's creator and when and if the form is published:

    form-publishing.png

    • Status- Set to yes to publish the form, set to no to unpublish the form. Unpublished forms can not be used in the front end.
    • Author- The user who created the form.
    • Created Date - The date the form was created on.
    • Start Publishing - The data and time at which to start publishing the form. Note the form has to be published for this option to be applied.
    • Finish Publishing - The data and time at which to stop publishing the form. Note the form has to be published for this option to be applied.

    Groups (top)


    Groups are the equivalent of HTML field-sets. They are used to contain your form's elements. Each element you create is assigned to a group. Your form must have at least one group.

    form-groups.png

    • Create a group with the same name as this form- When creating a new form this check box is ticked for you. It will automatically create a group and assign it to your form.
    • Or select and add the following available groups- This will list any groups you have previously created which have not yet been assigned to a form.
    • Add - To add the group to your form select it and press this button.
    • Current Groups- This shows the groups that have already been assigned to the form. The order they appear in this list is reflected in the order they appear in the form itself.
      • Up - To order a group up, select in in the current groups list and press this button .
      • Down- To order a group down, select in in the current groups list and press this button.
      • Remove- To remove a group from the form, select in in the current groups list and press this button.
    • Randomise Groups- will randomise the order in which the groups are shown in the form.

    Layout (top)


    The layout tab allows you to determine which template is used to render your form.

    form-layout.png

    • Front End Templates-
      • Form - Form template.
      • Details View - Details view template.
      • PDF template - state which template to use for the PDF rendering. Out put is as a details view - we don't support interactive PDF forms.
      • PDF Orientation - set the PDF paper orientation to be either landscape or portrait
      • PDF Paper Size- Increase the paper size to fit in larger sets of data.
        • Note: PDF requires the dompdf library; it's not included in the Fabrik core installation, you have to update from Fabrik GitHub to get it https://github.com/Fabrik/fabrik/
    • Admin Templates-
      • Form-The form template to use when in Joomla's administration pages.
      • Details View-Details view template to use when in Joomla's administration pages.
    • Layout-
      • Show Title-Show the form's title
      • Show Title In Details View-Show the form's title in the details view
      • Print Icon-Should a print icon be shown on the form/details view. This button opens up the page in a pop-up window, ready for printing
      • Email Icon-Should an email icon be shown at the top of the form/details view. This allows the user to email the page to someone.
      • PDF Icon - adds a PDF button to the form and details view.
    Additional Information

    Form templates are found in /components/com_fabrik/views/form/tmpl.
    Details templates are found in /components/com_fabrik/views/details/tmpl.

    Each template is contained within its own folder. To create a custom template copy one of the existing template folders, rename it and upload it to your site.

    For adding custom CSS to existing templates or creating custom templates see
    http://fabrikar.com/forums/index.php?wiki/index/#designers

    You can override the template files in your main Joomla template's html folder.

    Options (top)


    form-options.png

    • Show Related Data Links - If this form's table has related data links set up, and you select yes for this option then each of those related data links will also appear at the top of the form
    • Tip Hover Location - Element's can have addtional tip text assigned to them to help guide the user through the form submission process. This option defines where and how the tip text should be shown (above, side, below, hover)
    • Process Joomla Plugins - You can include in the form intro text or in your template or in certain Fabrik elements, text which renders Joomla content plugins. This option controls when and if these plugins are rendered.
    • CCK Category - Currently this is not used

    Plugins (top)


    The form plugins tab is used to add additional form processing functions such as email, paypal payments, etc. In order to setup a form plugin you simply select the Add button to setup new plugins.

    form-plugins.png

    There will be additional options available once you add a new plugin.

    form-plugins-added.png

    • Published - Toggles on/off whether the plugin is active
    • Do- The name of the selected plugin
    • In - Where the plugin should be run (admin / front end / both)
    • On - When the plugin should be run (new / edit /both)
    • Delete - Pressing this button deletes the plugin from the form
    To learn more about all of the Fabrik 3 form plugins and configuration options please view: 3.x Form Plugins

    Setting Field Data on Form Load (top)


    When creating new records you can set the default value of your form's fields by appending key/values to the form URL:

    E.g. if your form is located @ http://mysite.com/contact-us

    and you have an element whose full name is contacts___name then you can fill the name field with the value 'rob' by using this url:

    http://mysite.com/contact-us?contacts___name=rob

    to set the value of dropdown elements/radio buttons/checboxes append '_raw' to the end of the full element name:

    http://mysite.com/contact-us?contacts___agerange_raw=1

    Multiselect Joins(top)


    If you need to pre-select values in a "multi select" join element (one rendered as a checkbox or multiselect dropdown), you have to use a special placeholder, which is your join element's name with _id added, andappend [] on the query string to make it an array. The value(s) you give need to be the PK values of the table you are joining to. See this example:

    http://screencast.com/t/S3beP6QKlp4L

    ... where we show selecting three US States from a us_states table join, with PK values of 1,2 and 4.

    Working round ACL's(top)


    If your element's ACL prevents access by the logged in user, you cannot set the value directly. You will need to pass the info in via a query variable and then retrieve it using the element's Eval default.

    Append the following to your URL: this_info=my_value
    Where:
    "this_info" is an arbitrary variable name.
    "my_value" is the information you are passing in

    So, for example, your URL might be

    http://mysite.com/contact-us?this_info=1

    Then in the Eval default for that element, you'd do:

    PHP:
    $app = JFactory::getApplication();
    return $app->input->get('this_info', '');

    Using list filters values as default (top)


    You can set the element's default value to be that of the lists current filter value with this code:
    PHP:

    return FabrikHelperElement::filterValue(8);
     
    replace 8 with your element's id and ensure that the element's default's 'Eval' option is turned on

    Multi-page Forms(top)

    You need a form with multiple groups to create a multi-page form:
    create at least one group for every form page, in group settings set "Page break" = yes
    http://fabrikar.com/forums/index.php?wiki/groups/#pagination
    Note in Fabrik 3.0.x mutlipage forms are not compatible with the tabs template
  • Loading...