Name

widget —

ATTRIBUTES

Attribute Pos. Req. Default Description
name Yes Yes Name of the resulting HTML element.
set Override current or default widget value with specific data.
default Default value for a widget. The default is applied if there is no corresponding value for the widget in the values variable space.
pre_filter Filter name or names (separated by spaces) to apply to the widget's value prior to display.
attribute
table | db
field | column
key | outboard
extra
js
cols
delimiter
rows
data
passed
type
filter
interpolate     1 interpolate input?
reparse     1 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

BEHAVIOR

This tag does not appear to be affected by, or affect, the rest of Interchange.

EXAMPLES

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

NOTES

AVAILABILITY

widget is available in Interchange versions:

4.6.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: code/UI_Tag/widget.coretag
Lines: 58


# Copyright 2002-2007 Interchange Development Group and others
# 
# 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: widget.coretag,v 1.6 2007-03-30 23:40:54 pajamian Exp $

UserTag widget Order       name
UserTag widget PosNumber   1
UserTag widget attrAlias   db table
UserTag widget attrAlias   column field
UserTag widget attrAlias   outboard key
UserTag widget addAttr
UserTag widget HasEndTag   1
UserTag widget Interpolate 1
UserTag widget Version     $Revision: 1.6 $
UserTag widget Routine     <<EOR
sub {
my($name, $opt, $string) = @_;
#my($name, $type, $value, $table, $column, $key, $data, $string) = @_;
my $value;

if(defined $opt->{set}) {
  $value = $opt->{set};
}
else {
  $value = $::Values->{$name} || $opt->{default};
}
if($opt->{pre_filter}) {
#::logDebug("pre-filter with $opt->{pre_filter}");
  $value = $Tag->filter($opt->{pre_filter}, $value);
}
my $ref = {
      attribute  => $opt->{attribute} || 'attribute',
      db      => $opt->{table},
      field    => $opt->{field},
      extra    => $opt->{extra} || $opt->{js},
      cols    => $opt->{cols},
      delimiter  => $opt->{delimiter},
      rows    => $opt->{rows} || undef,
      name    => $name,
      outboard  => $opt->{key},
      passed    => $opt->{data} || $opt->{passed} || $string,
      type    => $opt->{type} || 'select',
      value    => $value,
      };

my $w = Vend::Form::display($ref);
if($opt->{filter}) {
  $w .= qq{<INPUT TYPE=hidden NAME="ui_filter:$name" VALUE="};
  $w .= $opt->{filter};
  $w .= '">';
}
return $w;
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

formel(7ic)

DocBook! Interchange!