Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PEAR] quickform exportValues never returns null ?
Hi,

Jeroen Houben wrote:
> It seems that exportValues never returns null for text inputs, even when
> no value was entered.

Yes, because text input always have a submit value unlike f.e. a checkbox.

> That's not such a bit deal, I thought I can
> overcome this by writing a filter:
>
>    function emptyStringsToNull($value)
>    {
>        return ($value == '') ? null : $value;
>    }
>
> But after running that, exportValues still doesn't return nulls, only
> empty strings ('');
> Is this normal behaviour? Should I just run the filter over the
> exportValues to get nulls instead of empty strings?

I think that's the best approach.

QuickForm may indeed have some problems handling nulls after your filter as 
you
don't get nulls form forms normally.

Report this thread to moderator Post Follow-up to this message
Old Post
Alexey Borzov
08-22-04 09:01 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:46 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.