Frank Rocco
|
| Posted: 11/18/2004, 12:18 PM |
|
Hello,
I have a listbox that looks up the user's name and id
When I save my record, the id is set to null.
the userid is of type int
any idea what is going on?
I am using mysql and PHP5
Thanks
Frank
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 11/18/2004, 4:09 PM |
|
Possibly it's the same problem as reported here: http://forums.codecharge.com/posts.php?post_id=49809
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
frank rocco
|
| Posted: 11/18/2004, 6:40 PM |
|
>>I was able to resolve the problem .... very strange.
It seems that when listboxes or a radio box group
are populated but disabled (on the client side), the
database columns attached to these items are not
set with the results. Instead, they are set to NULL.
<<
My listbox is disabled, what is the fix for this?
Thanks
Frank
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 11/18/2004, 6:47 PM |
|
The fix may be to change the HTML standards 
See: http://www.google.com/search?hl=en&q=html+reference+disabled http://www.htmlcodetutorial.com/forms/_INPUT_DISABLED.html
Quote :In fact, a disabled field is not even sent if the form is submitted.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
peterr
Posts: 5971
|
| Posted: 11/18/2004, 6:56 PM |
|
Actually, a workaround may be to:
a) Set the value manually via custom code in the Before Insert/Update Event. Assuming that you have a way of retrieving its value directly from the database, since users cannot change it anyway.
or
b) Similar to what I do with Labels that need to be "submitted" - create one updatable control (Hidden) and one non-updetable (Label or disabled Textbox/Listbox), both with the same values.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
klwillis
Posts: 428
|
| Posted: 11/23/2004, 2:10 PM |
|
I see you've run into the same problem I experienced
awhile back.
The way I resolved this problem was by using hidden fields.
Quote Frank Rocco:
Hello,
I have a listbox that looks up the user's name and id
When I save my record, the id is set to null.
the userid is of type int
any idea what is going on?
I am using mysql and PHP5
Thanks
Frank
_________________
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 |
 |
 |
frank rocco
|
| Posted: 11/24/2004, 4:53 AM |
|
Thanks, I did the same.
I don't remember this happening before, is this a CCS bug?
Regards,
Frank
|
|
|
 |
klwillis
Posts: 428
|
| Posted: 11/24/2004, 9:16 AM |
|
No, it's just the way disabled fields are handled within the form.
Quote frank rocco:Thanks, I did the same.
I don't remember this happening before, is this a CCS bug?
Regards,
Frank
_________________
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 |
 |
 |
pnjones
Posts: 42
|
| Posted: 03/29/2005, 4:06 PM |
|
When you are all discussing disabled is this the same as making the listbox invisible ?
_________________
Regards
Pat |
 |
 |
peterr
Posts: 5971
|
| Posted: 03/29/2005, 4:54 PM |
|
No, this was the "disabled" HTML attribute. The 2 links that I posted above explain it in detail.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |