| 1 | package HTML::FormHandler::Field::Submit; | ||
| 2 | # ABSTRACT: submit field | ||
| 3 | 26 | $HTML::FormHandler::Field::Submit::VERSION = '0.410000'; | |
| 4 | 26 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 26 | extends 'HTML::FormHandler::Field::NoValue'; | |
| 6 | |||
| 7 | |||
| 8 | 26 | has '+value' => ( default => 'Save' ); | |
| 9 | 26 | has '+widget' => ( default => 'Submit' ); | |
| 10 | 26 | has '+type_attr' => ( default => 'submit' ); | |
| 11 | 26 | has '+html5_type_attr' => ( default => 'submit' ); | |
| 12 | 26 | ▶ | sub do_label {0} |
|
Subroutine
do_label: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 13 | |||
| 14 | sub _result_from_input { | ||
| 15 | 13 | ▶ | my ( $self, $result, $input, $exists ) = @_; |
|
Subroutine
_result_from_input: called CC=1 SCAR=0.0
| |||
| 16 | 13 | $self->_set_result($result); | |
| 17 | 13 | $result->_set_input($input); | |
| 18 | 13 | $result->_set_field_def($self); | |
| 19 | 13 | return $result; | |
| 20 | } | ||
| 21 | |||
| 22 | 26 | __PACKAGE__->meta->make_immutable; | |
| 23 | 26 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 24 | 26 | 1; | |
| 25 | |||
| 26 | __END__ | ||
| 27 | |||
| 28 | =pod | ||
| 29 | |||
| 30 | =encoding UTF-8 | ||
| 31 | |||
| 32 | =head1 NAME | ||
| 33 | |||
| 34 | HTML::FormHandler::Field::Submit - submit field | ||
| 35 | |||
| 36 | =head1 VERSION | ||
| 37 | |||
| 38 | version 0.410000 | ||
| 39 | |||
| 40 | =head1 SYNOPSIS | ||
| 41 | |||
| 42 | Use this field to declare a submit field in your form. | ||
| 43 | |||
| 44 | has_field 'submit' => ( type => 'Submit', value => 'Save' ); | ||
| 45 | |||
| 46 | It will be used by L<HTML::FormHandler::Render::Simple> to construct | ||
| 47 | a form with C<< $form->render >>. | ||
| 48 | |||
| 49 | Uses the 'submit' widget. | ||
| 50 | |||
| 51 | If you have multiple submit buttons, currently the only way to test | ||
| 52 | which one has been clicked is with C<< $field->input >>. The 'value' | ||
| 53 | attribute is used for the HTML input field 'value'. | ||
| 54 | |||
| 55 | =head1 AUTHOR | ||
| 56 | |||
| 57 | FormHandler Contributors - see HTML::FormHandler | ||
| 58 | |||
| 59 | =head1 COPYRIGHT AND LICENSE | ||
| 60 | |||
| 61 | This software is copyright (c) 2017 by Gerda Shank. | ||
| 62 | |||
| 63 | This is free software; you can redistribute it and/or modify it under | ||
| 64 | the same terms as the Perl 5 programming language system itself. | ||
| 65 | |||
| 66 | =cut | ||