HTML
[ class tree: HTML ] [ index: HTML ] [ all elements ]

Class: HTMLforms

Source Location: /HTMLforms.php

Class Overview

Strings
   |
   --HTML
      |
      --HTMLforms

This class manages HTMLforms objects. This class creates xHTML forms.


Author(s):

Version:

  • 1.2

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTML

HTML::HTMLCloseTag()
HTML closing tag function
HTML::HTMLOpenTag()
HTML opening tag function

Class: Strings

Strings::__construct()
Construction function
Strings::console()
Console function
Strings::IsUTF8()
UTF8 detection function
Strings::QuoteStrip()
Quotes stripping function
Strings::RemoveAccent()
Accents removal function
Strings::RemoveSpaces()
Spaces removal function
Strings::stringHasNumbers()
Numbers detection function
Strings::ToUTF8()
UTF8 conversion function
Strings::ucwordsw()
Special uppercase function

Class Details

[line 34]
This class manages HTMLforms objects. This class creates xHTML forms.

Created on 28 apr 09

Changes: 1.1 -> 1.2: 21 jul 09 added: file is PEAR compatible 1.0 -> 1.1: 06 may 09 added: to HTML package updated: $name value suppressed (not Strict xHTML 1.1 for forms)




Tags:

author:  Pierre-Dominique Vienne <pvienne@me.com>
version:  1.2
license:  GNU Public License


[ Top ]


Class Variables

$html_needclose =  true

[line 45]

Variable that contains switch defining if tag needs to be closed



Tags:

access:  protected

Type:   bool
Overrides:   Array


[ Top ]

$html_tag =  "form"

[line 40]

Variable that contains tag



Tags:

access:  protected

Type:   string
Overrides:   Array


[ Top ]



Class Methods


method HTMLFormClose [line 146]

string HTMLFormClose( string $this->html_tag)

HTML closing Form tag function

This function is used to close xHTML Form tags. Result is stored in $this->html_output (added to the end of the string) and returned.

  1.  <?php
  2.  $oHTML_Form            new HTMLforms();
  3.  echo $oHTML_Form->HTMLFormClose();
  4.  // </form>
  5.  ?>




Tags:

return:  xHTML string corresponding to closed tag
since:  version 1.0
usedby:  HTMLforms::HTMLFormConstruct()
uses:  HTML::HTMLCloseTag()


Parameters:

string   $this->html_tag   xHTML tag to be opened

[ Top ]

method HTMLFormConstruct [line 206]

string HTMLFormConstruct( [ $sFormContent = null], [string $id = null], [string $action = null], [string $method = null], [string $enctype = null], [string $class = null], [string $style = null], [array $aScript = null], string $sDivContent)

HTML Form construction function

This function is used to construct xHTML Form. Result is stored in $this->html_output (added to the end of the string) and returned.

  1.  <?php
  2.  $oForm    new HTMLforms();
  3.  echo $oForm->HTMLFormConstruct(
  4.       $sFormContent,
  5.       "divName",
  6.       "divID",
  7.       "index.php",
  8.       "get",
  9.       "text/plain",
  10.       "divClass",
  11.       "divStyle",
  12.       array(
  13.           "onsubmit"  =>  "click();"
  14.       )
  15.  );
  16.  // <form name="divName" id="divID" action="index.php" method="get"
  17.  enctype="text/plain" class="divClass" style="divStyle"
  18.  onsubmit="click();">...</form>
  19.  ?>




Tags:

return:  xHTML string corresponding to HTML select
since:  version 1.0
uses:  HTMLforms::HTMLFormOpen()
uses:  HTMLforms::HTMLFormClose()


Parameters:

string   $sDivContent   div content
string   $id   xHTML id tag
string   $action   xHTML action of the form
string   $method   xHTML method of the form
string   $enctype   xHTML encryption type of the form
string   $class   xHTML class tag
string   $style   xHTML style tag
array   $aScript   array containing scripts data
   $sFormContent  

[ Top ]

method HTMLFormOpen [line 93]

string HTMLFormOpen( [string $id = null], [string $action = null], [string $method = null], [string $enctype = null], [string $class = null], [string $style = null], [array $aScript = null], string $this->html_tag, bool $this->html_needclose)

xHTML Form opening tag function

This function is used to open xHTML Form tags. Result is stored in $this->html_output (added to the end of the string) and returned.

  1.  <?php
  2.  $aScript array("onsubmit" => "go();");
  3.  $oForms  new HTMLforms();
  4.  echo $oForms->HTMLFormOpen(
  5.       "fooName",
  6.       "barID",
  7.       "index.php",
  8.       "get",
  9.       "text/plain",
  10.       "myClass",
  11.       "myStyle",
  12.       $aScript
  13.  );
  14.  // <form name="fooName" id="barID" class="myClass" action="index.php"
  15.  method="get" enctype="text/plain" style="myStyle" onsubmit="go();">
  16.  ?>




Tags:

return:  xHTML string corresponding to opened tag
since:  version 1.0
usedby:  HTMLforms::HTMLFormConstruct()
uses:  HTML::HTMLOpenTag()


Parameters:

string   $this->html_tag   xHTML tag to be opened
string   $id   xHTML id of the tag
string   $action   xHTML action of the form
string   $method   xHTML method of the form
string   $enctype   xHTML encryption type of the form
string   $class   xHTML class parameter
string   $style   xHTML style parameter
array   $aScript   scripts to be added
bool   $this->html_needclose   switch defining if the tag needs to be closed

[ Top ]


Documentation generated on Wed, 26 Aug 2009 12:30:19 +0200 by phpDocumentor 1.4.1