Form validation with Spry
Adding a behavior of "Validate Form" in the behaviors tab was relatively easy. All of the form elements were displayed an it was self explanatory what parameters to associate with the form elements.
Password validation and conformation with Spry
When creating the form, the password and confirm password validation was used to create these 2 fields. Again these were very straight forward and the steps were the basically the same as inserting a text field. The only difference is that the confirm field asks which field to confirm against, and Dreamweaver actually guessed the correct field. Both of these can be accessed from the Spry insert icons or from the following:
Insert > Spry > Spry Validation Password
Insert > Spry > Spry Validation Confirm
Set text for text field in a form
For the Sign-Up form, I added a set text behavior. First I set an initial value inside the comment section. Then I used a set text behavior with a blank field to drop out the text field upon focus. I when I tested it, I found that this behavior would blank out the comments every time you put focus on it. Therefore, I added to the code a variable to save any typing that the user does, then comes back to the field. In the head of the document, I found the function that controls this behavior (MM_setTextOfTextfield). Then I set a variable named firstlook equal to 1, outside the function.
var firstlook=1
function MM_setTextOfTextfield(objId,x,newText) {
Then I added an if statement that looks for the value of firstlook before it clears the comments field. If it is one, the it clears the field and sets firstlook to 0. If it is not 1 then it doesn't clear the field and the user doesn't lose the information that they typed into the comments on an earlier focus.
if (firstlook ==1){
firstlook =0;
with (document){ if (getElementById){
var obj = getElementById(objId);} if (obj) obj.value = newText;
}}}