Max Length for text boxes from db col field length

thread: 8 messages  |  last: about 5 years ago  |  started: tuesday, august 22, 2006, 4:27 am pdt


#1  |  ByronH (Tzaneen, Limpopo) South Africa
Tuesday, August 22, 2006, 4:27 AM PDT

Hi there,
I was looking through the database adapter code when I noticed that at some point $intMaxLength is obtained for a column's field length.
Qcodo doesn't appear to save this value in the data object and I thought it could be pretty cool to use this for controlling the max-length of text boxes and also for additional validation without the need for hard coding these values each time.
Is this already a feature?

#2  |  Martin Kronstad (Mjoendalen) Norway Qcodo Core Contributor
Tuesday, August 22, 2006, 7:30 AM PDT

I second this, I also wondered why there is no feature like this.

#3  |  alex94040 (Seattle, WA) United States of America Qcodo Core Contributor
Tuesday, August 22, 2006, 12:29 PM PDT

Same with me, I'd love to have this - have to do it manually now.

#4  |  jcinacio Portugal
Monday, October 9, 2006, 4:40 AM PDT

If i'm not mistaken, even if some checking was done on the generated classes one would still have to manually specify that limit on QForm widgets, or am i wrong?


Still, even if this is the case, it gets +1 from me =)

#5  |  ByronH (Tzaneen, Limpopo) South Africa
Monday, October 9, 2006, 6:16 AM PDT

Yes, the idea is to have the field length value available for use should the developer choose to use it for the appropriate control type, for instance single line QTextBox.

#6  |  jlehman (Tampa, FL) United States of America
Monday, October 9, 2006, 7:50 AM PDT

I am in same boat where I want it for additional validation of the field so I am voting aye too.

#7  |  Gadianton (San Jose, CA) United States of America
Tuesday, November 28, 2006, 1:12 PM PST

Yep...was just trying to do the same thing here on my end as well. Would be great to just reference the data object's max length value on any varchar columns somewhere instead of hardcoding or manually specifying it manually (either in the extended data object or in your QForm directly).

#8  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Wednesday, November 29, 2006, 10:09 AM PST

Folks, see the discussion here:
<http://www.qcodo.com/forums/topic.php/1193/1>

And feel free to make comments in that thread.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.