Name

checkbox — return user-supplied value if its length is 1 or more, an empty string otherwise

DESCRIPTION

The filter checks for the length of input. In case the input contains one or more characters (a true number, in fact), it returns the input itself. If the length is zero, an empty string is returned.

The filter is suitable for retrieving values out of HTML checkboxes.

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

checkbox is available in Interchange versions:

5.4.0-5.7.0 (cvs-head)

SOURCE

Interchange 5.7.0:

Source: code/Filter/checkbox.filter
Lines: 17


# Copyright 2002-2007 Interchange Development Group and others
# Copyright 1996-2002 Red Hat, Inc.
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: checkbox.filter,v 1.3 2007/03/30 23:40:44 pajamian Exp $

CodeDef checkbox Filter
CodeDef checkbox Routine <<EOR
sub {
my $val = shift;
return length($val) ? $val : '';
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

nullselect(7ic)

DocBook! Interchange!