CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Posting disabled field values

Print topic Send  topic

Author Message
lquental

Posts: 15
Posted: 09/28/2004, 6:59 AM

Hello,

How do I post the value of a disabled field (Input) into a table.
The code looks ok, but the value on the table is always posted as Null

Here is a part of my update function:

$this->SQL = "UPDATE docdetail SET "
. "PRODUCT_CODE=" . $this->ToSQL($this->cp["PRODUCT_CODE"]->GetDBValue(), $this->cp["PRODUCT_CODE"]->DataType) . ", "
....
. "TOTAL=" . $this->ToSQL($this->cp["TOTAL"]->GetDBValue(), $this->cp["TOTAL"]->DataType) );

The field TOTAL is the one that has a disabled input.

Thanks for any help,

Luis
View profile  Send private message
klwillis


Posts: 428
Posted: 09/28/2004, 8:49 AM

Hi Luis -

Since the field is disabled, CodeCharge Studio will ignore the value
of the field when updating or inserting records - at least that's what
I've seen.

The way I worked around this was to create a hidden field whose
data source is the database field that needs updating, and the
disabled field is set to the value of the hidden field within the 'Before Show' event.

I guess there are several work arounds to this one depending on
what you're trying to achieve by disabling fields.

Also, when you can, make your fields readonly instead of disabled
when possible, this will eliminate the Null postings. ;-)
_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message
peterr


Posts: 5971
Posted: 09/28/2004, 8:54 AM

There is no way to do this since HTML specifications don't allow disabled input fields to be submitted. See http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.12.1
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
klwillis


Posts: 428
Posted: 09/29/2004, 10:12 AM

Quote peterr:
There is no way to do this since HTML specifications don't allow disabled input fields to be submitted. See http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.12.1

Thanks for clarifying.

Making the fields read-only, or providing a hidden field and a label
will work nicely. :-) :-)
_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.