close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Adding additional fields to User Registration Form

Thread began 12/28/2010 8:32 am by tsasokan237086 | Last modified 1/25/2011 3:30 pm by Ray Borduin | 5995 views | 27 replies |

tsasokan237086

Adding additional fields to User Registration Form

Hello!
I want to add extra fields to "users_Registration.php". To do this according to my understanding I need to do changes to the original solution pack files.

I really could not figure out where to start. I do have all your Extensions installed in Dreamweaver CS5.

Will you please give me a work flow in a sequential order, either by using Dreamweaver CS5 or directly by modifying the Solution Pack files. I am want to make sure the new fields are created in the form (or all related forms) and properly validated and reported in the admin side queries.

Please give me a good start!
By the way my thanks to Ray for fixing the email verification part of the user_Registration form. Excellent help with a lot of understanding and patience.
tsasokan

Sign in to reply to this post

Ray BorduinWebAssist

To add a form field:

1) update your database to add a column in your users table associated with the new field you are adding.

2) you could copy and paste to create new rows in the table, or simply use Dreamweaver to add new form fields. If you use Spry fields, they will have similar client validations.

3) If you want extra security that you can't get with client validation, then you can also update the server validations using the Server Behavior applied on the page (Assuming you have Form Builder installed).

4) Update the Insert Record Server Behavior that inserts the field to the database (if you have DataAssist installed)

5) Update the Insert, Update, and Profile pages to add fields similarly.

Sign in to reply to this post

tsasokan237086

Add Date fields

Ray, Thanks for the Steps , I am adding the fields now. But I need your help again with the DATE FIELD

In the Registration form I need to add two date fields in "MM-DD-YYYY".

Please tell me how to add and format the new date fields in Insert, Update and Profile pages to be compatible with the MySql Format.

I do have Form Tool Kit. I do not know if the Date Picker could be used for Date Of Birth fields, which will be the kind of field I need to add in the Registration Form

I do have Form Builder 2, as well all the updated WebAssist Extensions installed in Dreamweaver.

Again, thanks for all your timely help that brought me this far!
tsasokan

Sign in to reply to this post

Ray BorduinWebAssist

Just use php to reformat the date:

<?php echo(date('Y-m-d H:i:s',strtotime($_POST['FieldName']))); ?>

Sign in to reply to this post

tsasokan237086

New Field Validation

Hello Ray:
I am inserting a new text field and tried to apply validation to match the validation codes applied to the rest of the user_registration form text fields. I tried Spry as well as Validation Tool Kit (Form Builder 2) client as well as server side. None of them create the same codes created in the default form fields you have provided.

I inserted the text field using Dreamweaver insert field, entered id,applied class:WAATKTextField, (I selected onBlur but it is not appearing on the code line).

Now to match the validation you have done in the original user_Registration form, please help me the steps.

NEXT

Now to insert in the Database using Data Assist. The steps I tried are:

I checked the DATABASES panel and I do see both Local and Remote servers show up with Identical Database and Table.

Then I open the Server Behaviors Panel and click on the + sign, Dataassist, Insert, Single Record insert.

Assuming, I am in the right track, should I do this on the local server database or the remote database. How do they sync?

Then I tried the bindings panel, where none of the new fields are appearing, what should I do in the bindings panel.

Again advice me the sequential steps I need to take.

Thanks again for all your walk through, I have come this far.

TS Asokan

Sign in to reply to this post

Ray BorduinWebAssist

Spry validation should match the validation we use. What are the differences that you see.

We use spry validation and Validation Toolkit server validation.

Updating the insert should be a matter of double-clicking the exising server behavior and not using the plus button to add a new insert server behavior (the same thing goes for updating the Server Validations).

Sign in to reply to this post

tsasokan237086

I have inserted a spry validation text field for Middle_Name. Applied serverside validation using (Form Builder 2) Validation tool kit. Updated the server behavior.

I am pasting the code for the existing First_Name Field and the newly created Middle_Name Field. I do not see the Valdation tool kit codes

<tr>
<th>First Name:</th>
<td><span id="sprytextfield2">
<input name="UserFirstName" type="text" class="WAATKTextField" id="UserFirstName" onBlur="if (document.getElementById('firstNameServerValidation')) document.getElementById('firstNameServerValidation').style.display='none'" value="<?php echo(ValidatedField("usersRegistration","UserFirstName")) ?>" size="32" />
<span class="textfieldRequiredMsg">A value is required.</span></span>
<?php
if (ValidatedField("usersRegistration","usersRegistration")) {
if ((strpos((",".ValidatedField("usersRegistration","usersRegistration").","), "," . "11" . ",") !== false || "11" == "")) {
if (!(false)) {
?>
<span class="textfieldServerError" id="firstNameServerValidation">
Please enter your first name. </span>
<?php //WAFV_Conditional users_Registration.php usersRegistration(11:)
}
}
}?></td>
</tr><br>
<tr>
<th>Middle Name:</th>
<td><span id="sprytextfield11">
<input type="text" name="UserMiddleName" id="UserMiddleName">
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
<tr>

Sign in to reply to this post

Ray BorduinWebAssist

That is the server validation error message.

In most cases it isn't necessary since it would only be used if someone turned javascript off in their browser.

To add it, you would add a span with the textfieldServerError class and a unique ID and the text with the error message you want displayed, usually matching the client error text. Then highlight the span and click the plus button and apply a form toolkit show if server behavior to only show that span if it fails the validation for that field.

Sign in to reply to this post

tsasokan237086

This post has been deleted.

tsasokan237086

Ray:
To update:
Thanks! Now the users_Registration.php form works fine with added new fields.
Now the next step;
The users_Registration form has all the new fields in place. So I need to insert new fields in the follwing forms also:
1. users_Delete.php
2. users_Detail.php
3. users_report_Search.php
4.users_Results.php
5. users_Search.php
6. users_Update.php
7. users_Profile.php
I do see each form has different server behavior attached to the fields

Is there any way I can update all the above forms,by simply modifying the users_registration form server behaviors. Do I need to validate these forms too?

TS Asokan

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