1. "Fabrik 4" helpers needed!

    You are invited to join other community members active in coding, maintaining and improving Fabrik. Please visit https://fabrik.help for more information!
    Dismiss Notice

Joomla user form plugin

Jan 26, 2019
Joomla user form plugin

  • Introduction (top)

    This plug-in allows you to create new Joomla users, or edit existing Joomla users

    Note if you want to update the Joomla user associated with the form's record when you edit the form's data you must supply a field (type field or dbjoin) in the "User ID field" (and in Fabrik3: a "usergroups" element in the "User group field") option in the 'Fields' section.

    Options - Fields(top)


    The first series of dropdowns (name, username, password, email, block, user id and user group) allow you to map your Fabrik element's to the Joomla user properties.

    Joomla default value for Block: 0 = enabled / unblock; 1 = disabled / block

    Options - Bypass Joomla Settings(top)

    • Bypass activation - By default, and with this option set to 'No' the plug-in will use Joomla's standard activation emails and settings to control how users confirm their account. If you don't want this to occur, then set this option to 'Yes', by doing so users are automatically created and confirmed.
    • Bypass registration - Again by default, and with this option set to 'No' the plug-in will respect Joomla's 'Allow User Registration' setting (found under Joomla's user manager -> options section). If set to 'Yes' users can always be created regardless of the Joomla setting
    • Account details email - If set to 'No' then the default email will not be sent to the registering user confirming their account creation. This could be useful if you wanted to use the Fabrik email form plugin to send a custom email
    • Bypass all Email - If Yes, no email will be sent by this plugin. Instead you can use an Fabrik form email plugin. This will allow you to use HTML, PHP or article templates to customize your registration email.



    • Default user group - this is the default user group that the user will be assigned to - will be overridden by the user group field, if it is selected.
    • Condition - PHP code that if supplied should return true to enable the plugin, or return false to disable the plugin. Example:
      Code (Text):
      return '{mytable___myelement}' == 'some value needed to enable the plugin';

    Options - Sync(top)


    • Delete users - If set to yes, then the associated Joomla user is deleted when the Fabrik row is deleted, for this to work a user id field must have been selected
    • Auto Login - if set to yes we will try to log in the user as soon as the form is submitted.
    • Synchronize Users - If you have existing Joomla users and are creating this form, and want to copy over those previous users into the form's list, then set this option to 'yes'. Upon loading the form for the first time and creating a new user, the juser plugin will create Fabrik list records for all the previously created Joomla users. Note this only occurs when the form's list is empty (e.g. upon the first submission of the form)
    • Sync on Edit - If set to 'yes' then upon saving an exisitng record, the Joomla user's details are syncronised with the form's data.

    Creating a Menu Item(top)

    Once you have created a registration or profile form using the juser plugin, you will usually wish to link to it with a J! menu item. To do this, you will need to specify two additional options in the usual Fabrik Form menu creation. Usually when loading a form, Fabrik uses the Primary Key value as the row ID. But in the case of a profile form, you need to tell Fabrik to look up the row using the logged on user's J! user ID. If the user already has a form, their row will be used. if they don't, a new one will be created.

    The two special options are:

    • Row ID - set this to -1, which tells Fabrik to use the logged on J! user ID, if the user is logged on.
    • Key name - you need to tell Fabrik which element on your form is the user element, the one that stores the J! user ID. In this example, that would be 'userid'.

    Overriding J! Registration Link (top)

    Something else you may need to do is override your default J! site registration link to point to your form. To do this, you need to override the standard J! registration link, using J!'s standard template override mechanism.

    Joomla2.5/Fabrik3 (top)

    For example, if you are using the Beez 20 template :
    • create the following folder : ./templates/beez_20/html/com_users/registration
    • replace beez_20 with whatever J! template you are using. In that folder, create a default.php file with the following code:

    defined('_JEXEC') or die;
    $app = JFactory::getApplication();
    replace '/joomla17/index.php/profile' with whatever URL the steps from Creating a Menu Item produces.

    Joomla1.5/Fabrik2 (top)

    For example, if you are using the Beez template :
    • create the following folder : ./templates/beez/html/com_user/register
    • replace beez with whatever J! template you are using. In that folder, create a default.php file with the following code:

    defined('_JEXEC') or die;
    $app = JFactory::getApplication();
    Replace X with your fabrik form ID
  • Loading...