Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 28th, 2005, 6:00 PM   #1
aznluvsmc
Hobbyist Programmer
 
Join Date: Aug 2005
Posts: 137
Rep Power: 4 aznluvsmc is on a distinguished road
How to force all form fields to be submitted

Hi,

I have a form with various fields composed of text boxes, radio buttons and check boxes. When the form is submitted, only the fields which have a value are actually put into the query string. Since I don't have all the fields, I can't check to see if they are valid. How can I force the form to send all fields whether even if they are empty?

Thanks.
aznluvsmc is offline   Reply With Quote
Old Oct 28th, 2005, 6:07 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Are you sure this is a Perl question? Have you researched the HTTP protocol? HTML? Checkboxes? Is your girl busy this coming weekend? Is she fed up?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Oct 28th, 2005, 6:14 PM   #3
aznluvsmc
Hobbyist Programmer
 
Join Date: Aug 2005
Posts: 137
Rep Power: 4 aznluvsmc is on a distinguished road
I know user agents are not required to get the fields if they have no value. The question is, can I overcome this. In my Perl script, I can easily hard code the fields in and check if they were submitted but that doesn't seem very flexible. If that's my only option then I guess I don't have much of a choice.
aznluvsmc is offline   Reply With Quote
Old Oct 28th, 2005, 6:25 PM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
It's very difficult, from the viewpoint of the server, to force a browser, on a client, from whom you are mainly disconnected, to do precisely what you like. If you figure that out, I'll give you half the proceeds.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Oct 28th, 2005, 6:30 PM   #5
aznluvsmc
Hobbyist Programmer
 
Join Date: Aug 2005
Posts: 137
Rep Power: 4 aznluvsmc is on a distinguished road
Ok... thanks. I guess I'm gonna have to code the fields into the script to check the values.
aznluvsmc is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:25 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC