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

Joomla user form plugin

  • Views Views: 35,421
  • Last updated Last updated:

Navigation

         Form Article Plugin Tutorial
      Autofill form plugin
      Clone form plugin
      Comment form plugin
      Email form plugin
      EXIF form plugin
      FTP form plugin
      J2store form plugin
      Kunena form plugin
      Limit form plugin
      Logs form plugin
      Mailchimp form plugin
      Paginate form plugin
      Paypal form plugin
      PHP form plugin
      Pingdotfm form plugin
      Receipt form plugin
      Redirect form plugin
      REST form plugin
      Slack form plugin (+)
      SMS form plugin
      Twitter form plugin
      Upsert form plugin
      VBforum form plugin
      Create a Search Form
      Accordion Form Groups
  • Introduction​


    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​


    juser-fields.png



    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​


    juser-bypass.png

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

    Options​


    juser-options.png


    • 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:
      return '{mytable___myelement}' == 'some value needed to enable the plugin';

    Options - Sync​


    juser-sync.png


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


    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'.
    Usekey.png



    Overriding J! Registration Link​


    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​

    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:
    PHP:

    <?php
    defined('_JEXEC') or die;

    $app = JFactory::getApplication();
    $app->redirect('/joomla17/index.php/profile');
    ?>
    replace '/joomla17/index.php/profile' with whatever URL the steps from Creating a Menu Item produces.

    Joomla1.5/Fabrik2​

    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:
    PHP:

    <?php
    defined('_JEXEC') or die;

    $app = JFactory::getApplication();
    $app->redirect('index.php?option=com_fabrik&c=form&view=form&fabrik=X&rowid=0');
    ?>
    Replace X with your fabrik form ID
Back
Top