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. When the length of input is non-zero, the filter returns input itself. When the length is zero, the filter returns an empty string.

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:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.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!