Joomla Tutorials and Blog Posts
Fabrik and Custom Joomla User Registration Forms
May 08, 2012 |
Joomla Tutorials |
Written by Tessa Mero
Fabrik is a wonderfully powerful and flexible Joomla extension.
In a previous tutorial we showed you how to use Fabrik to create a contact form. In this tutorial we're going to use Fabrik to create a custom user registration form. Step 1: Get Fabrik Set UpStep 2: Add the Form- Click on Components > Fabrik > Forms > New to begin your first form.
- Enter a Label. This will be the name for your form.
- Set Status to Yes.
- Scroll down to the Form processing area.
- Enter a table name. This is where your form entries will be stored in the database. It is best to use only lowercase letters and underscores to create this name.
- Make sure that Save partially completed multi-page forms is set to No.
- Click on Save and Close.
- Click on the Lists tab.
- Scroll down and click the Advanced drop down, and set Alter existing field types to "No".
Step 3: Add Elements- Click on the Elements tab.
- Click on the -Select form- dropdown and select the form that you just created.
- Click New and create several elements you'd like on your user registration form.
- Important Make sure you remember to create a minimum of "Required Fields" from your core joomla user table or else it will not validate. These elements are:
- Name
- Username
- Password
- Email
Step 4: Link Your Form to Joomla Users- Click on "Forms" and click on the name of your user registration form.
- Click on the "Plug-ins" tab on the right side and click "Add".
- Select "juser" In "front end" On "new".
- Match the core Joomla user fields to your existing fields that you created.
- Remember to click "Yes" for Synchronize Users if you want to import all your current users into this new registration table. To do this, you must have all fields that are being used match your new table or else database errors will occur.
Step 5: Publish and Use the Form- Create a new menu item that links to the customized registration form.
- Click Save and Close.
- Congratulations! You have made your own custom user registration form!
- If you'd like to add captcha to your form, you can install the Fabrik Element - Captcha which you can find from updating from Github (http://github.com/fabrik/fabrik) and Purge Cache/Discover/Install. You can then go back into the Elements section and add a new element as "Captcha".
- Fill out an entry to see what happens. I will use the name "John Doe".
You can now view the User Manager in your Joomla administrator area and your new user will be there. You have successfully finished creating a customized user registration form that links with your core Joomla users table! |
Add comment
Comments
Joomla 2.5
I've done that but still cannot find the plugin. I try extract the fabrik installer to check if I can manually install it. But I think the plugin is not included in the latest version.
github.com/.../master
And copy these directories into your root joomla directory: administrator, components, libraries, media, modules, and plugins. (Basically exclude any files and exclude the fabrik_build directory). You will then have every single plugin available for Fabrik. Refer to post #4 if you do not see the new Plugin. Make sure you overwrite all existing files in FTP.
If you can post on the Joomla forums: ostraining.com/support-foruum
I will be happy to troubleshoot with you until it is working flawlessly. :-)
Elbowman, I'm glad you got it figured out, care to share what you did for others who are in the same boat as you? Thanks!
What I got figured out was how to properly download and install the Fabrik files from the github.com server, to obtain the registration form plug-in. I was able to perform the work in your initial Fabrik training, building a simple form with fields for input.
However, I've not been able to successfully create a registration form. I'm getting a raft of errors when I click the form from my menu. Like these...
Unknown column '' in 'field list' SQL=INSERT INTO buds_registrati on SET `` = '4' , `email` = 'xxxxxxxx'5203f bc7077a35117e61 53d6d3950320:sv pkNATsLB6xEW6Uc 7y1fcVbN8jSYWb7 ' ,
An error occured while Synchronizing users. Please verify that all fields are correctly set in your Fabrik LIST and selected in the form's juser plugin
I haven't had a chance to focus on it to determine a resolution. If you have any tips I'm open to suggestions, Tessa.
2. Extensions Manager > Discover > Purge Cache > Discover
3. Search for Fabrik Element - Captcha.
4. Install
5. Plugin Manager > Search for Fabrik Element- Captcha, Enable.
6. Open User registration form element list, add new element, captcha, fill in repatcha details.
7. You now have captcha on your form!
First off, thanks to Tessa for producing these tutorials. I'm one of the developers of Fabrik, and it's good to see people giving it a go.
Just to let you know, as of the next release (3.0.7) we will be making all the non-core plugins available as downloadable, separately installable ZIP's, so you won't have to go through the rather cumbersome github / discover process. 3.0.7 should be released within the next few days.
-- hugh
Could precise anything about that ? Thanks a lot by advance...
Thanks for the tutorial, was very helpful.
Can you take it a step further by showing me how all the custom fields can be editable when the user clicks on the Edit Profile link.
At the moment only the core Joomla fields - name, username, password and email are available for the user to edit.
None of the custom fields are visible.
To make a custom registration form really useful, the user needs to be able to edit all the fields.
Hope you can provide this information.
Regards,
Robin
What is the exact version of the Fabrik files I need to follow this tutorial, I just downloaded the ones in your links and I couldn't find the plugin needed.
I just realized that your links point to the latest version and maybe the plugin it's not there anymore.
No fabrik plugin in my joomla 1.5
If you intend to use sync on edit, then you should create an element to store the user_id and assign that in the juser plugins 'User ID field'
Finally I would suggest not setting the lists alter field types to 'no', this would only be of use if your list was pointing at a core Joomla database table.
Name
Username
Password
Email
I have other several fields I've added to the form, but those fields aren't saving into the users table. Is that normal?
Have emailed the fabrik team, but certainly appreciate any thoughts. I assumed Id just create a menu link without userID=-1 and make accessible to public users but no job so far.
:/