The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

TL::Form - Form class (ja)

NAME (ja)

TL::Form::JA - �����í�若�������

SYNOPSIS

  my $form = $TL->newForm;
  $form->set(Command => 'DoDispList');
  
  $TL->location(
      $form->toLink('foo.cgi'));
  # Location: http://....../foo.cgi?Command=DoDispList

DESCRIPTION

CGI��吾�勉�壔����ʋ����宴��篆������������壔�í�鴻�� 筝���ゃ�勉�㏍�若��絲障�����1��や札筝���勐�ゃ�������ゃ��

METHODS

$TL->newForm
  $form = $TL->newForm
  $form = $TL->newForm(a => 1, b => [2, 20])
  $form = $TL->newForm('http://foo.com/?a=1&b=2&b=20')

TL::Form ��ŝ����吾�с�壔�����篏������� 筝���ɾ�勉�勐就綣���с��URL��������壔����ʋ����宴�������潟�若��������������

const
  $form->const

�����勉�<�純����������若�喝�冴��������篁ュ�������í�若�������若�帥�勐����眼�壚���櫝�純����ŝ�����

clone
  $NewForm_obj = $form->clone

�����í�若����ŝ����吾�с�壔����勤��茖純��菴�������

addForm
  $form->addForm($another_form)

�����í�若�������ャ�勉����í�若�������若�帥��菴遵�������������������㏍�若��絖������������翫����� �����勉�㏍�若�勉����若�帥�夌舟���������������������

getKeys
  @keys = $form->getKeys

�����í�若����勉�㏍�寂��荀с��菴���������������ц�������㏍�若�˨�壔����≪�������㏍�若����������������<� ��˨�˩�������������������勉�壠�˨�障�ŝ�����

get
  $value = $form->get($key)
  $value = $form->get($key, $joinstr)

���絎���������㏍�若�勐�ゃ�� $joinstr ��х����������☀��������$joinstr�����ユ����� "," ���篏睡� ������������$key ���絖���������ŝ����翫����� undef ���菴������������<�ゃ�˨�勉�㏍�若�����絎������� ��翫����� undef ���菴�������

getValues
  @values = $form->getValues($key)

���絎���������㏍�若�勐�ゃ����������ц�������� $key ���絖���������ŝ����翫����� () ���菴�������

getSlice
  %data = $form->getSlice(@keys)

���絎�������茲���違�㏍�若��絲障����⓾����㏍�若����ゃ��鐚���ゃ�ŝ����ゃ����勉����勉�������ゃ��茲���違�ŝ�� 茲���違�勐�ゃ�勰�������吾�勉�ŝ����<�㋘�潟�鴻�勉����≪�������������激�ャ�������☀�������� 絖���������ŝ����㏍�若�夌�∴��������������

getSliceValues
  @values = $form->getSliceValues(@keys)

���絎�������茲���違�㏍�若��絲障����⓾����ゃ��鐚���ゃ�ŝ����ゃ����勉����勉�������ゃ��茲���違�ŝ�� 茲���違�勐�ゃ�勰�������吾�勉�ŝ����<�㋘�潟�鴻��絲上����������⓾����������������☀�������� 絖���������ŝ����㏍�若��絲障����⓾�壔�����������絲上����������ゃ��undef��˨�ŝ�����

lookup
  $flag = $form->lookup($key, $value)

���絎������������㏍�若�����絎������������ゃ����������違��1��������������с�ŝ��������undef���菴������� $key���絖���������ŝ����⓾�������í�若����壔�ŝ����ŝ�����

set
  $form->set($key => $value, $key2 => $value2, ...)
  $form->set($key => \@value, $key2 => \@value2, ...)

���絎������������㏍�若�˨�����絎������������ゃ����祉�������������� 篁ュ����勐�ゃ�壠け������������鐚�筝���吾�����������鐚�

add
  $form->add($key => $value, $key2 => $value2, ...)
  $form->add($key => \@value, $key2 => \@value2, ...)

���絎������������㏍�若�˨�����絎������������ゃ��菴遵����������� 篁ュ����勐�ゃ�壠け��������ŝ�����鐚�菴遵�����������鐚�

exists
  $flag = $form->exists($key)

��㏍�若��絖�������������1��������������с�ŝ��������undef���菴�������

remove
  $form->remove($key, $value)

���絎������������㏍�若�����������絎������������ゃ����������ゃ����� ���絎������������㏍�若����ゃ����ŝ����翫����壚����������ŝ�����

delete
  $form->delete($key)

���絎������������㏍�若�������ゃ����������㏍�若��絖���������ŝ����翫����壚����������ŝ�����

getFile
  $iohandle = $form->getFile($key);

��㏍�若��絲上��������IO�����潟����˨����������冴����������<�ゃ�˨�≪�������㏍�若�������勉�水��緇���с�� �����������<�ゃ�˨�≪�������㏍�若����с�壔�ŝ����c����翫����������㏍�若��絖���������ŝ����翫���� undef ���菴�������

setFile
  $form->setFile($key, $iohandle);

���絎���������㏍�若��IO�����潟����˨����祉��������������

getFileKeys
  @keys = $form->getFileKeys();

��≪�������㏍�若����������������<�ゃ�˨�勉�㏍�寂��荀с��菴�������

getFileName
  $filename = $form->getFileName($key)

��㏍�若��絲上�������������<�ゃ����������������冴����������<�ゃ�˨�≪�������㏍�若�������勉�水��緇���с�� �����������<�ゃ�˨�≪�������㏍�若����с�壔�ŝ����c����翫����������㏍�若��絖���������ŝ����翫���� undef ���菴�������

setFileName
  $form->setFileName($key => $value)

���絎���������㏍�若�˨����<�ゃ����������祉��������������

  $form->setLink('http://.../?a=1&b=2')

URL�����������潟�若�������☗�������������㏍�若����ゃ�勉����≪�с���𡉴����ゃ��臀勉��������������

  $form->addLink('http://.../?a=1&b=2')

URL�����������潟�若�������☗�������������㏍�若����ゃ�勉����≪��菴遵�����������

setFragment
  $form->setFragment($fragment)
  $form->setFragment(undef)

URL��勉����í�違�<�潟�����荐㊤��������������������toLink��勛��������綵演�帥��������

getFragment
  $fragment = $form->getFragment;

URL��勉����í�違�<�潟��������緇����������

  $url = $form->toLink($base)

�����í�若�������若�帥��URL��勐就綣����紊�������菴�������$base������絎�������������������URL��勐���� ���?key=value���綵√����с����若�帥��菴遵�����������$base��������ャ�����������undef������絎������������� ��ɱ����ʃ昆��吾�勉�ŝ�潟�壔��菴�������

URL���������腓冴��������TL�����㋘�若����壔�若�壔�т����������������≪����ŝ�宴�若�激�с�潟�с�������◑����ŝ����� ���絖���潟�若����ゅ�ョ����勉����若�帥��篁�筝���������� TL�����㋘�若����壔�若�壔�т����������������≪����ŝ�宴�若�激�с�割札紊���吾�勉�ŝ�潟�壔��篏������������翫����壔�� toExtLink��<�純����������ñ�����������������

�����í�違�<�潟�����絖������������翫����壔����������� #xxx ��勐就���URL��勌賢��̥����粋昭��障��������

  $url = $form->toExtLink($base)
  $url = $form->toExtLink($base, $code)

�����í�若�������若�帥��URL��勐就綣����紊�������菴�������$base������絎�������������������URL��勐���� ���?key=value���綵√����с����若�帥��菴遵�����������$base��������ャ�����������undef������絎������������� ��ɱ����ʃ昆��吾�勉�ŝ�潟�壔��菴�������

$code��ф��絖���潟�若��������絎����������������絖���潟�若�����紊���������⓾�����URL�����潟�潟�若����������� ���絎������ŝ����c����翫����� UTF-8 ��潟�若����у�阪�����������

�����í�違�<�潟�����絖������������翫����壔����������� #xxx ��勐就���URL��勌賢��̥����粋昭��障��������

haveSessionCheck
  $result = $form->haveSessionCheck($sessiongroup)
  $result = $form->haveSessionCheck($sessiongroup, $issecure)

���絎���������祉����激�с�潟�違�˨�若����勉�祉����激�с��ID�����ñ����������㏍�若���憜�������í�若�����������莨若�障����⓾�����������腆肴����������� ������莨若�障����⓾�������違��1�����������ŝ�������違��undef���菴������� $Template->addSessionCheck ��������≪�т戎������������

���絎���������祉����激�с�潟�違�˨�若�����Ini��ц┃絎�������csrfkey���綽�荀���������������ʃ┃絎���勐�翫�������í�若����ŝ����� csrfkey�����祉����激�с��ID�����ñ�������⓾�㏍�若��篏������������冴��csrfkey��壔�泣�ゃ��罸���̹�������ゃ�����������紊�������羲������ŝ����������˨�����篋����

篏睡��筝㏍�勉�祉����激�с�潟�� mode ��� 'double' ��勐�翫����壔�� 膃�2綣���違�� 0 ��障����� 1 ������絎�������������http��眼��https��眼�����絎���с�������� �����ャ�������翫����壔�������勉�������勰��篆<�� http/https ��勉�í�<����с����������˨����c�☁�御��������������

SEE ALSO

TL

AUTHOR INFORMATION

    Copyright 2006 YMIRLINK Inc. All Rights Reserved.

    This framework is free software; you can redistribute it and/or modify it under the same terms as Perl itself

    �����勉����㋘�若����壔�若�壔�壔����ŝ�若�純�������⓾�с�≪�с����������ŝ����� Perl �����������í�ゃ�祉�潟�鴻�� �����у�����絽������喝����眼��茵���������������堺�ャ�障�����

    Address bug reports and comments to: tl@tripletail.jp

    HP : http://tripletail.jp/