close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Changing registration qualifiers

Thread began 1/19/2010 3:05 pm by laldrich374081 | Last modified 2/22/2010 4:57 pm by Eric Mittman | 6951 views | 26 replies |

laldrich374081

Changing registration qualifiers

Where can I change the requirement for numbers and special chars in the feilds on the user registration pack? I can see where to change the text that shows up. Can I also just delete some feilds in the user_registration.php file for the user not to fill them in? I am kinda a newbie and can get lost in the code easily.

Sign in to reply to this post

Eric Mittman

The User Registration Solution pack works with client and server side validations. If you would like to alter the validations you could do so with the spry validations and using CSS Form Builder or Validation Toolkit.

If you want to remove a particular field on the form you must also remove the validation for that field. Before you delete it look at the blue colored tab around it to identify what spry is applied to it, then go to the bottom of the page and look for that spry. You must delete the spry validation as well as the server side validation that appears at the top of the page.

If you post back with some more details about what specifically you wanting to change and what field to delete I can give you some more detailed steps to take.

Sign in to reply to this post

laldrich374081

Changing the form

If I delete the Phone# thru the country catagories in the form, what else should I do?

Sign in to reply to this post

laldrich374081

Also

I would like to make it so any password will work

Sign in to reply to this post

Eric Mittman

To remove the phone number from the registration you can just remove the form field:

php:
<input name="UserPhone" type="text" class="WAATKTextField" id="UserPhone" onBlur="if (document.getElementById('PhoneServerValidation')) document.getElementById('PhoneServerValidation').style.display='none';WAValidatePN(document.forms[0].UserPhone,'- Invalid phone number',false,true,'x (xxx) xxx-xxxx',document.forms[0].UserPhone,0,true)" value="<?php echo(ValidatedField("usersRegistration","UserPhone")) ?>" size="32" />



Then you need to remove at least the server side validation:

php:
$WAFV_Errors .= WAValidatePN(((isset($_POST["UserPhone"]))?$_POST["UserPhone"]:"") . "",false,true,true,13);



This will get rid of the field for you. You should also remove the spry validation code for this but it will not be necessary:

var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {validateOn:["blur"], minChars:7, maxChars:20});



Please describe exactly how you would like to make it so that any password works. The way the user registration currently works is to have a user register with username, password and other details. When the user returns to the site they must enter the same username and password they used to register to login to the site. Please describe how you would like it to work differently.

Sign in to reply to this post

laldrich374081

Password

currently the password requires 6 chars at least 1 number and 1 letter this is what I would like to change to maybe 5 chars any chars letters or numbers.

Sign in to reply to this post

Eric Mittman

The first thing you would want to adjust for this is the spry validation for the password. Toward the bottom of the page is this line of code:

var sprypassword1 = new Spry.Widget.ValidationPassword("sprypassword1", {validateOn:["blur"], minChars:6, minNumbers:1, minAlphaChars:1});



It is the three parameters in here that control the character length and type of chars:
minChars:6, minNumbers:1, minAlphaChars:1

You can change the min chars to be whatever you want, then for the other two you can just delete them so in the end it would look like this:

var sprypassword1 = new Spry.Widget.ValidationPassword("sprypassword1", {validateOn:["blur"], minChars:5});



Next you would want to update the server side validations that are enforcing these rules. This is controlled by these three lines of code toward the top of the page:

php:
$WAFV_Errors .= WAValidateEL(((isset($_POST["UserPassword"]))?$_POST["UserPassword"]:"") . "",6,50,true,3);
$WAFV_Errors .= WAValidateRX(((isset($_POST["UserPassword"]))?$_POST["UserPassword"]:"") . "","/[0-9]/",true,4);
$WAFV_Errors .= WAValidateRX(((isset($_POST["UserPassword"]))?$_POST["UserPassword"]:"") . "","/[a-z,A-Z]/",true,5);



The first one is checking the length and the next two are checking the type of chars. You can update the first to be a 5 instead of 6 then delete the next two, this would look like this:

php:
$WAFV_Errors .= WAValidateEL(((isset($_POST["UserPassword"]))?$_POST["UserPassword"]:"") . "",5,50,true,3);
Sign in to reply to this post

laldrich374081

Thanks Eric I will give this a try!!

Sign in to reply to this post

Eric Mittman

Let us know if have any other questions about this or come across any problems.

Sign in to reply to this post

laldrich374081

Hi Eric

I tried these and everything seems ok but now it stopped sending the validation code via email. I don't think that i changed any the in any other files. Where can I look. You can look at aldrichphotos.com

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...