close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

State and zip code

Thread began 6/29/2010 11:39 am by lih400228 | Last modified 6/29/2010 5:08 pm by lih400228 | 1770 views | 3 replies

Jimmy Wu

Find line 878, which should look like this:
var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8", "none", {validateOn:["blur"], minChars:5, maxChars:10});

on the users_Registration.php page. Change the minChars and maxChars to match with how it should be for your country's zip.

Deleting the zip from the form is a little more complicated. The easiest way to get this to work is to just have the state field have a default value and insert that default value into the database. You can delete all the options except for the first two. Then you would want to move the selected="selected" to the second option. then you would want to set the span tag to have a style setting the visibility to hidden. Next you would want to remove the </tr>, <tr> and <th>State:</th> tags above the span tag. The end result should look like this (I've included the city table row as well):

<tr>
<th>City:</th>
<td><span id="sprytextfield7">
<input name="UserCity" type="text" class="WAATKTextField" id="UserCity" onBlur="if (document.getElementById('cityServerValidation')) document.getElementById('cityServerValidation').style.display='none'" value="<?php echo(ValidatedField("usersRegistration","UserCity")) ?>" size="32" />
<span class="textfieldRequiredMsg">A value is required.</span></span>
<?php
if (ValidatedField("usersRegistration","usersRegistration")) {
if ((strpos((",".ValidatedField("usersRegistration","usersRegistration").","), "," . "16" . ",") !== false || "16" == "")) {
if (!(false)) {
?>
<span class="textfieldServerError" id="cityServerValidation">
Please enter your city. </span>
<?php //WAFV_Conditional users_Registration.php usersRegistration(16:)
}
}
}?></td>
<td><span id="spryselect1" style="visibility:hidden">
<select name="UserState" id="UserState" onBlur="if (document.getElementById('stateServerValidation')) document.getElementById('stateServerValidation').style.display='none'" onChange="if (document.getElementById('stateServerValidation')) document.getElementById('stateServerValidation').style.display='none'" >
<option value="" <?php if (!(strcmp("", (ValidatedField("usersRegistration","UserState"))))) {echo "selected=\"selected\"";} ?>>Choose a state</option>
<option value=" " selected="selected" <?php if (!(strcmp(" ", (ValidatedField("usersRegistration","UserState"))))) {echo "selected=\"selected\"";} ?>>N/A</option>
</select>
<span class="selectRequiredMsg">Please select an item.</span> </span>
<?php
if (ValidatedField("usersRegistration","usersRegistration")) {
if ((strpos((",".ValidatedField("usersRegistration","usersRegistration").","), "," . "17" . ",") !== false || "17" == "")) {
if (!(false)) {
?>
<span class="textfieldServerError" id="stateServerValidation">
Please choose your state. </span>
<?php //WAFV_Conditional users_Registration.php usersRegistration(17:)
}
}
}?></td>
</tr>

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