Form::Factory::Control::Value - A read-only value control


Form-Factory documentation Contained in the Form-Factory distribution.

Index


Code Index:

NAME

Top

Form::Factory::Control::Value - A read-only value control

VERSION

Top

version 0.020

SYNOPSIS

Top

  has_control preset_value => (
      control => 'value',
      options => {
          label      => 'Preset',
          is_visible => 1,
          value      => 'Neo',
      },
  );

DESCRIPTION

Top

A read-only value. These may be displayed in the form or just passed through the stash. They might be passed by form submission as well (depending on the interface, but this should be avoided).

This control implements Form::Factory::Control, Form::Factory::Control::Role::Labeled, Form::Factory::Control::Role::ScalarValue.

ATTRIBUTES

Top

is_visible

Set to true if the read-only value should be displayed.

AUTHOR

Top

Andrew Sterling Hanenkamp <hanenkamp@cpan.org>

COPYRIGHT AND LICENSE

Top


Form-Factory documentation Contained in the Form-Factory distribution.
package Form::Factory::Control::Value;
BEGIN {
  $Form::Factory::Control::Value::VERSION = '0.020';
}
use Moose;

with qw(
    Form::Factory::Control
    Form::Factory::Control::Role::HiddenValue
    Form::Factory::Control::Role::Labeled
    Form::Factory::Control::Role::PresetValue
    Form::Factory::Control::Role::ScalarValue
);

has '+value' => (
    required  => 1,
);

has is_visible => (
    is        => 'ro',
    isa       => 'Bool',
    required  => 1,
    default   => 0,
);

1;