[dokuwiki] Re: Improvements in form handling for plugins
- From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Sat, 28 Jul 2007 23:08:12 +0200
On Thu, 26 Jul 2007 17:29:34 -0400
"TNHarris" <telliamed@xxxxxxxxxxx> wrote:
> Ah, I had actually made that change but forgot to include it in the
> patch.
> Only thing is, empty() isn't well suited because it returns true for
> the string "0".
> Perhaps...?
> foreach($params as $key => $val){
> if($key{0} == '_' || ($skipempty && (is_null($val) || $val=='')))
> continue;
Ah, yes. Makes sense,
> > I'd expect the following order:
> > type, name, value, label, id, class, attrs
>
> I see your point. Although with that order 'value' would be a required
> parameter since 'label' is. Or should it use the name when 'label' is
> empty? I think that'll work well.
Yes good idea.
> 'id' can default to empty and
> 'class' to either "simple" or "block"? (I think "block", it's used
> most often in inc/html.php.)
I'd leave it empty by default.
> (Is there much difference using "" versus null for default
> parameters?)
Not really, but I think an empty string is more intuitive. It's what I
would use to set "no class".
Andi
--
http://www.splitbrain.org
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- References:
- [dokuwiki] Improvements in form handling for plugins
- From: TNHarris
- [dokuwiki] Re: Improvements in form handling for plugins
- From: Andreas Gohr
- [dokuwiki] Re: Improvements in form handling for plugins
- From: TNHarris
Other related posts:
- » [dokuwiki] Improvements in form handling for plugins
- » [dokuwiki] Re: Improvements in form handling for plugins
- » [dokuwiki] Re: Improvements in form handling for plugins
- » [dokuwiki] Re: Improvements in form handling for plugins
- [dokuwiki] Improvements in form handling for plugins
- From: TNHarris
- [dokuwiki] Re: Improvements in form handling for plugins
- From: Andreas Gohr
- [dokuwiki] Re: Improvements in form handling for plugins
- From: TNHarris