Form Validation And Re-population

I am working on a script in asp (new to asp, 99% php) and I would like to validate the data (no problem) and then repopulate the data in the table that passed validation, spit out error message for bad data, and leave those areas blank, without using javascript.

I had no problem doing this in the past with php (they have more and better array methods in my opinion) but I am struggling with how to do this in asp.

Has someone done this before? If so, could you share the logic on this?

Scenerio: two fields, one validates, one doesn't, show the form with first name given and last name blank while displaying reason for last name error. I understand the scenrio, but I can't make it work in asp???

View Replies


ADVERTISEMENT

ASP/Dreamweaver/Form Population

1)

I have two forms - ie. Rate Request and Booking. I have two databeses. One for rate requests and the other one for bookings.

2)

Upon submiting Rate Request form all customers get their unique quote #.

Question. The booking form has a bunch of different fileds but in essence they are the same as the quote request fileds in respect to the info in both. So to help the customers I want to enable this: upon entering their unique quote # in the Booking form I want the info from their Rate Request to be automatically filled in in the booking form. All infor needs to be in their respective text fields. I know how to populate each singe field, but have no clue how to make this "smart" population.

View Replies View Related

Javascript Form Validation - Form Action To Another Page

In my prototype asp page (with no javascript and no password validation, I have a registration form with the following action:

<form name="form" method="post" action="RegDetails.asp">

This works fine, the form details are collected by RegDetails.asp

I am attempting to include javascript server side validation for the pasword, which obviously requires password and password2 fields (to be verified). I have used the script available at:

http://javascript.internet.com/forms/val-pass.html

It works fine in a new blank page with the form action:

<form name=myForm onSubmit="return validatePwd()">

The final stage in this javascript demo form displays an alert box:

else {
alert('Nice job.');
return true;


When I change the first line of my original form to:

<form name=myForm onSubmit="return validatePwd()">

how do I get my original action of - action="RegDetails.asp" instead of this alert box?

View Replies View Related

Form And The Form Validation In The Same Page

I have a simple form to accept two form fields and display the values
entered on pressing the submit button. The following is the form I have
created to accept the two entries and display the form fields on
pressing the submit form. It does not work can somebody please correct
the code or provide a simple equivalent code where I can have the form
and the validation and usage of the form values in the same ASP page.

Code:

View Replies View Related

Text Box Population

The there some way to populate a text field, for modification of a database entry, with black text and then
all of the text that the user writes in it is colored red or blue or any other color than black?

View Replies View Related

Drop Down Population

In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc.

I'm using

Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM
Parts_Table")

to populate a drop down but would like to use several drop downs restricting the contents of each drop down to the records pertaining to one particular componet type eg a drop down only for type A, only for type B etc.

can this be done if so how?

The other thing I like to do is add the price field to the drop down list (two fields in one drop down) is this done just by seperating the fields by a ","?

View Replies View Related

Validation Form

can any one show me how to validate the serial number in numerical format like this:06-02-01-xxxxxx
the code i try to use was as below but cannot be done:

If IsNumeric(Form_serial_no)=0 OR InStr(Form_serial_no,"-")=0 Then
Response.write "<br>*Serial Number in wrong format"
Validated_Form =False
End If

View Replies View Related

Validation For Form

how can I validate the form; like making sure the user has entered there phone number in (###)-###-#### this format or social secruity ###-##-####. How could I make my form pop an alert box up when they click the submit button so they will not be able to submit till they follow the following format.

View Replies View Related

Form Validation

On contact, order, recommend a friend page etc. I run a JavaScript that checks that all the required information has been entered into the form, and it will stop the ASP script executing until you change the incorrect information and Submit the form again. With this script, there is a function that checks the email address and tells you if the address is not valid. (i.e. If the address doesn't have an @ sign).

I put this script to work, and found that many people were turning off JavaScript, filling the form in (and now obviously enter XXXXX) into the email address field and then sending the form that way.

As a safety net, the ASP application that sends me an email checks that fields are not blank, but I don't know how (or whether) you can check to see if the email address is valid.

View Replies View Related

Web Form Validation

I need to create a self-validating HTML form using a server-side Excel spreadsheet as the datasource. The customer punches in their order number into the form. A lookup occurs. The rest of the form fields populate automatically with relevant data from the spreadsheet.

View Replies View Related

Validation Of Dynamically Form

I have a form that is created dynamically from a recordset, this creates a line for each record together with 2 checkboxes, Yes & No so the source output would be something like this:

<p>Please indicate whether you still use each piece of software detailed below:</p>
<form name="apps" method="POST" action="MyAction.asp">
<table width="600" border="1" cellspacing="0" cellpadding="5">
<tr bgcolor="#9999FF">
<td><font color="#FFFFFF"><strong> Software</strong></font></td>
<td><font color="#FFFFFF"><strong>Required?</strong></font></td>
</tr>

<tr>
<td>Adobe Photoshop 7.0 7.0</td>
<td><input type="checkbox" name="Yes" value="Adobe Photoshop 7.0 7.0">
Yes
<input type="checkbox" name="No" value="Adobe Photoshop 7.0 7.0">
No </td>
</tr>

<tr>
<td>Citrix ICA Client</td>
<td><input type="checkbox" name="Yes" value="Citrix ICA Client">
Yes
<input type="checkbox" name="No" value="Citrix ICA Client">
No </td>
</tr>

<tr>
<td>Macromedia Dreamweaver MX 6.0</td>
<td><input type="checkbox" name="Yes" value="Macromedia Dreamweaver MX
6.0">
Yes
<input type="checkbox" name="No" value="Macromedia Dreamweaver MX
6.0">
No </td>
</tr>
</table>
<p>
<input type="submit" name="Submit" value="Submit">
</form>

And so on......

I want to ensure that either Yes or No has been checked for each line before the form can be submitted, can this be done in asp? The amount of lines in the form will vary.

View Replies View Related

ASP Form Validation Problem

i have a radio button and i want to pass the value of the radio button which it holds to a javascript and then pop up a message box with that value Code:

View Replies View Related

Validation Of Simple Form

Let's take this for example:

<form action="" method="post">
Firstname: <input name=""frmFirstname"><BR>
Lastname:" <input name=""frmLastname"><BR>
Email" Address: <input name=""frmEmailAddress">
<input" type="submit">
</form>

what i want to do is to show a Javascript Alert Window when the user enters a blank field and when the user enters an invalid email format.

View Replies View Related

Form Validation Code

I'm making form validation that checks a form that will be added to the database when filled out correctly, the error message will be in the form of a line above the form stating that you forgot to enter some fields correctly and pictures of X's behind the field that weren't Filled out correctly. But I can't get it to work correctly. Can someone please help me and if possible change my code or tell me where exactly I need to add certain pieces of code.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/conn_db.asp" -->
<%
Function isValidation(Len)
If Len(Request.Form) > 0 Then
name = Trim(Request.Form("name"))
formOk = True

If name = "" Then
errName = "*Error: Please enter your name"
formOK = False
End If....

View Replies View Related

ASP Form Validation With VBScript

I am trying to validate an asp form with VBScript, I am searching on the net but can't find the proper way to validate an option button to ensure one of the options was selected. Here is my code This one validated whether you select an option or not: Code:

View Replies View Related

Form Field Validation?

We have a shared hosting plan (Windows-based) with GoDaddy.com. GD.com has a
"generic" form mailer script (gdform.asp) that allows us to set up a
"Contact Us" page, which, when the user clicks "Submit" sends an email to
us.

I am a complete newbie re asp, but looking at the code, it looks to me as if
a error is generated if any of the fields are left blank--which is good. I
don't want to be getting emails that don't contain messages, or that don't
contain a return email address.

However, submitting a completely blank form results in me getting an email
with blank response fields.

Can you take a look at this code and tell me if it should be allowing blank
fields to be submitted? Are there any changes that can be made? Code:

View Replies View Related

Form Field Validation

I would like to make two field in a for required fields. Do you all know a simple way to accomplish this? I can post form and any asp if needed( page is getting really huge).

View Replies View Related

Form Validation Redux

First off wanted to that all that replied to my previous questions, you were much help.Had a couple of general questions.Why has everyone suggested not using VB Script on the Client Side?

Secondly, I have decided to do my validation on the processing page.If a field on the form does not meet the validation rules, I am able to redirect back to the sending page. How do I do this so that the sending page retains the values that the Client had previously put in so that he only needs to correct the fields that are not valid?

View Replies View Related

Form Field Validation

I have a form field on an ASP page and was wondering if I can require the number that is entered to begin with a 0 or a 2.If the number starts with anything else,the user is notified to update the number correctly(Your [FormField] must begin with a 0 or a 2, Please update your entry).

View Replies View Related

Form Validation For Checkboxes

have 6 checkboxes on the form i want the user to select 3 of them if the user doesnt select any of them fire an alert if the user selects 3 of them then only submit the form if the user selects 5 of them fire an alert telling him he has to select only 3 same thing applies if he selects 2 checkboxes tell him to select 3

here is the code i have written and its not working ...

View Replies View Related

Form Validation Within FCK Editor

Within FCK Editor is there any way of doing form validation?

For example

You create a form and want to add two text fields and a submit button.

At the moment i guess the only way to do is editing the html, does anyone have any good solutions that overcome this problem.

I guess one could add a checkbox when adding the textbox that says validation but not sure how one would go about actually get this validation to work.

View Replies View Related

Form Validation When Empty

I have a page containing a basic form in asp. When the form is completed the information is passed to another asp file which generates an email and sends it to me. For example,

Joe Bloggs fills in the form requesting information. When he hits Submit the information is sent to me on email.

I have included form validation to catch any uncompleted form fields and prompt the user for information. But when i try and submit an empty form my validation is ignored and the form is submitted sending the email to me with no information.

I know the validation is correct because when i remove the Form Action property the validation works fine.

View Replies View Related

Form Validation (Blaw)

I am trying to update a database via a Front End Application (Web Based). My problem is that I have to do some validation before updating the database.I have to check that if a dropdownlist (main) SelectedItems is not empty that all related textboxes (2) and another dropdownlist (secondary) has some data in it, or the other way round, that if any of the text boxes and the dropdownlist (secondary) contains data that all the related controls are also not empty.

My current Front End is an Excel Form and I am using the TAG properties to do validation.

View Replies View Related

Form Validation On Mac Not Working

THe form is set up using a form validation script on the server and using erver.transfer to return the user to the form if it required fields are not filled in. THe issue he is having is that if he misses in so much as ONE field and submits it returns him to an empty form. I have had others try this and it works great. I'm baffled.

View Replies View Related

Dynamic Form Validation

I am trying to complete a form validation for a repeated dynamic text box. Someone shared some code with me that doesn't seem to do the trick but it lead me in the right direction. Here is the code that I'm using: Code:

View Replies View Related

Validation That Validate Whole Form

I built a form with all fields validated:

here's my code===========================

' validation
Dim validationOK
validationOK=true
For Each elem in fields
'all fields required
'If (Trim(fields(elem))="") Then validationOK=false
Next
If (Trim(fields("name"))="") Then validationOK=false
If (Trim(fields("email"))="") Then validationOK=false
If (validationOK=false) Then
Response.Write DisplayPage("error.html", fields)
Response.End
End if

end code================

how can I change this so that certain fields are NOT required.

View Replies View Related

Dynamic List Population Problem

I have a series of dropdown boxes on my site which are generated from the database which work fine, but when I go to modify the code for list boxes (multiple select), it doesn't work and I can't figure out why it wouldn't work. Code:

View Replies View Related

Automatic Population Of Text Boxes

I need help on this ASAP. I have to deliver this in another 3 days. There is a ASP page that has 4 text boxes. In the 1st one, I will enter a value. based on this value I enter in the text box, the other 3 text boxes should be filled in automatically. These values for the other 3 text boxes should be retrieved from a SQL Server 200 database based on the value in the 1st text box.

View Replies View Related

ASP Client-Side Form Validation

This would be the longest project I have worked on, but I'm trying to use client side validation on a form that collects a users information. The problem I have is how do you validate a field when processing the form and if a field say is EMPTY, then error message and the users needs to enter some data.

I know that I can say POST="validate.asp" or something, however I have this page going from one form page to another and I can't get my head around being able to validate the field on the page before processing the form and moving to page 2 form, and so on.

Is there away to have the validation on the first page and somehow once validated move to page 2 form?

View Replies View Related

Form Validation Javascript Inside ASP ?

I have an ASP application which gathers information to put in a
database via some forms - I would like to do the form validation
(making sure some fields are not empty) with a Javascript script inside
the ASP file - what is the syntax for doing this? Usually I would place
the javascript inside the <head> tags, but ASP files don't have
those.

View Replies View Related

Form Field Length Validation

Alright what I need to be able to do is to make the field it's maxlength if the user does not enter enough characters.

<input type="hidden" name="B" size="10" maxlength="6" value="">

so basicly if the user enters a 5, 4, 3, or 2 digit number the input will be forced to it's maxlength. I need this because I am writing to an SQL db and am combining multiple form inputs into one field in the db table ie(variable = A&B&C&D)

On a different webpage I need to display the variables. I am doing this by string manipulation functions like the one below.

Nbr = mid(aTable1Values(DATA, aRowLoop), 6, 6)

(DATA = A&B&C&D)

View Replies View Related

Form Validation Username, Password

I have a form that i'm using to collect a NEW users username, password, confirm password and email address.

I cannot seem to grasp the concept of the various ways to "validate" these fields. Here is what i'm needing.

*Username field is required (cant be left empty) and doesn't match any current username records - I do have the form going to a page that does the SELECT WHERE blah blah and has the rs.eof thing but I'm not sure how this is fitting into the part where we make sure its not blank. Also when there is an error, I was hoping it would redirect them back and leave the "correct" data in the spaces. Mine seems to empty every last field even the correct ones. Is there a way to only change or blank out the wrong fields?

*Password required (cant be left empty) and both fields match.

I have something like this so if they do match, it continues on ....

View Replies View Related

Form Validation Before Submission To Page

I have a timesheet type form that has 40 different row - each row has two dropdowns, one for a project and one for a task, and a dropdown box for each day of the week. Once a project and task has been selected, hours spent on that task each day of the week are entered into the text boxes.

What I would ideally like to do is, before I send this page for processing on my asp page (which involves saving the data back to the database), I'd like to check whether or not the user has entered the same project/task combination on multiple rows.....the dropdowns on each row are named project1-project40, task1-task40, mon1-mon40 etc.

I'm using VBScript for the server side scripting, but I'll happily incorporate a section of Javascript code if that will offer me a simpler solution.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved