HTML Submit Blank Form Fields

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a form that updates a database table row.  The form sends back
all fields that are filled in, and my CGI updates those fields.  My
problem is if a user blanks out a field, that field is not sent
back, ,and so the CGI does not update the field to blank.

Is there a way for the form to submit all fields regardless of whether
data is entered in them?


Re: HTML Submit Blank Form Fields

Gazing into my crystal ball I observed writing in

Quoted text here. Click to load it

If you are using input type text, you should receive an empty value upon
submission.  The only exceptions are radio, checkbox and select.  
However, if you specify a default value, you should get those as well,
<input type="radio" value="" name="field" checked> Default
<input type="radio" value="a" name="field">A
<input type="checkbox" value="" name="field" checked> Default
<input type="checkbox" value="a" name="field">A
<select name="field">
<option value="" selected>Default</option>
<option value="a">A</option>

Again, as Jonathan said, your server side script should check these
fields before sending anything to the database.

Adrienne Boswell at Home
Arbpen Web Site Design Services
Please respond to the group so others can share

Site Timeline