Custom registration page

15 years 10 months ago #64927 by beat
Replied by beat on topic Re:Custom registration page
nwood888 wrote:

Thanks for the response beat!

I'll do one of those, worst case. But is it not possible to create a stand-alone html page and just post into the CB registration system? Even if I have to disable some security checks?

Nick


CB registration form has multiple anti-spambots-registration tricks that you would need to implement in your static form as well. You can try, but i will not be able to assist you on this one for time reasons, sorry.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

15 years 10 months ago #64988 by nwood888
Replied by nwood888 on topic Re:Custom registration page
I understand your position beat, and I can't wait for CB 2.0 when this type of thing is supported natively. However, I was able to find an easier, but still not perfect, solution to this problem. It works for my situation. Here's what I did:

1. Create all of the fields for your form from within the Joomla! administrator. Try to do a thorough job here because changes later are difficult, though still possible.

2. Go to your registration page in a browser and view the document source. Find where your first form field starts and copy and paste all of the table rows into a new file in your joomla document root. I called mine signup.inc.php. In that file, I pasted the code in something like this:

<tr><td colspan="2">
<table border="0">
<tr><td><div>

-- paste data here --

</div></td></tr>
</table>
</td></tr>

Note: After I pasted the data into this file, I removed all of the icons, but this isn't required if you want them.


3. Edit the file components/com_comprofiler/comprofiler.html.php. From around line 1430 (CB 1.2) and on, I looked for code sections that output things that I didn't want, such as the getFieldIcons and the _REGISTER_TITLE and I commented or removed them.

4. Somewhere around line 1450, there's a line 'echo $tabcontent'. That's where CB outputs the form fields. Comment that line out and add:
include 'signup.inc.php';

This will include the file you created in step 2.

Now test your form to make sure it works. Once it does, you're free to create the style and layout from within signup.inc.php.


The advantages to this are that I have complete control over the look of the signup page, which is absolutely critical for my application.

Drawbacks are that it creates more manual work if you need to adjust the registration fields very often. It also causes some issues relating to error handling during the registration process. For example, if you have an error when you fill out the registration form, when you submit and validation fails, it will not re-populate the fields with your previously entered values. I have a few ideas on how to work around this problem, but haven't implemented them yet. One is to just re-create javascript error handling from within signup.inc.php

Hopefully someone will find this useful. When you need the power of CB, but you also need a more custom sign-up page, this is one method that seems to work OK.

Nick

Please Log in to join the conversation.

15 years 10 months ago #65064 by beat
Replied by beat on topic Re:Custom registration page
Thanks a lot for finding and sharing your solution :)

Yes, so it can work too, with all the restrictions that you carefully documented. B)

I can't guarrantee a full compatibility forward with this method, but it solves your current problem :)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

15 years 10 months ago #65354 by sjnims
Replied by sjnims on topic Re:Custom registration page
on the topic of custom registration pages, any news on custom validation for specific fields? I need to test a field against a regular expression. The field has the same purpose of a CAPTCHA image, but is more restrictive. I only want members of my organization to be able to register, and currently I have to manually monitor this field when new registrations come in. If I were able to test it against a regex, the process becomes automated and non-members can't ever submit a registration because they don't know the correct input for the field.

steve nims
www.gammanu.org

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.200 seconds

Facebook Twitter LinkedIn