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

Class: ContactForm

Source Location: /forms/ContactForm.class.php

Class Overview

ABSTObject
   |
   --ABSTHTMLTag
      |
      --HTMLForm
         |
         --ContactForm

A class to generate contact forms. After submit there will be generate a plaintext email to a recipient.


Author(s):

Version:

  • 0.2.0

Copyright:

  • Copyright (C) 2003 Daniel Plücken <daniel@debakel.net>

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTMLForm

HTMLForm::HTMLForm()
Constructor
HTMLForm::addDummyItem()
Adds dummy-form-item to this object. It doesn't apear on the website.
HTMLForm::addFormBodyText()
Adds text into the form.
HTMLForm::addFormItem()
Adds references of form-items to this object.
HTMLForm::addHiddenFormItem()
Adds hidden-form-items to this object.
HTMLForm::changeHiddenFormItem()
Changes the value of the hidden form item with the given namen.
HTMLForm::disable()
Disables all formitems. This function is an alias for the function disableAllFormItems()
HTMLForm::disableAllFormItems()
Disables all formitems.
HTMLForm::get()
Returns a generated string based on the Attributes of this HTML-Object.
HTMLForm::getFieldsAndValues()
Returns the fieldnames and values of the form by a two dimensional array.
HTMLForm::getFormInTag()
Builds the tag to introduce the html form.
HTMLForm::getFormItemCount()
Returns the count of items of this form.
HTMLForm::getItemPHPSource()
Generates the sourcecode to build this object and returns it.
HTMLForm::getJScheckData()
Returns a javascript to validate the input of the form.
HTMLForm::getMethod()
Returns the method-attribute of this form.
HTMLForm::getName()
Returns the name of this form.
HTMLForm::getPHPSource()
Generates the sourcecode to build this object and returns it.
HTMLForm::getRightRequestData()
Returns raw data from a given request variable; Removes escapings if magic quotes is enabled.
HTMLForm::getSubmitOrder()
Returns the javascript that should execute on form submit.
HTMLForm::getTargetFile()
Returns the action-attribute of this form.
HTMLForm::isFormItem()
Adds references of form-items to this object.
HTMLForm::overrideWholeFormBody()
Overides the body of the form with the given custom string.
HTMLForm::removeHiddenFormItem()
Removes the hidden item with the given name.
HTMLForm::setDisabled()
Disables all formitems. This function is an alias for the function disableAllFormItems()
HTMLForm::setFormBody()
Builds the content of this Form andstores it in the attribute form_body.
HTMLForm::setJSerrorMessage()
Sets the javascript error message that appears if user information is missing.
HTMLForm::setLayoutString()
Adds the string by dint of the form should be formatted.
HTMLForm::setLayoutTable()
Adds the table by dint of the form should be formatted.
HTMLForm::setMethod()
Sets the method, how the data should be send; POST or GET.
HTMLForm::setName()
Sets the name of this form.
HTMLForm::setNoFormat()
Stores that the HTML-elements should not format by "\r\n" in the source.
HTMLForm::setSubmitOrder()
Sets the javascript that should execute on submit.
HTMLForm::setTargetFile()
Sets the target script of the data; The "action"-attribute.
HTMLForm::setTargetFrame()
Sets the target frame where the target script should appear; The "target"-attribute.

Class: ABSTHTMLTag

ABSTHTMLTag::getId()
Returns the value of this tag's "id"-attribute.
ABSTHTMLTag::getName()
Returns the value of this tag's "name"-attribute.
ABSTHTMLTag::HTMLTag()
The Constructor let the script die, cause this is an abstract class!
ABSTHTMLTag::idExists()
Stores all used ids and makes sure that every id in the document is unique. It should called in every get method of classes in the packages forms and html.
ABSTHTMLTag::setAttributes()
This method allows to set the attributes of the tag that are not handled by other methods.
ABSTHTMLTag::setFreeStyle()
Set the value of style definitions that are not handled by implemented methods.
ABSTHTMLTag::setId()
Stores the value of this item's "id"-attribute.
ABSTHTMLTag::setName()
Stores the value of this tag's "name"-attribute.
ABSTHTMLTag::setNoFormat()
Stores that the HTML-elements should not format by "\r\n" in the source.
ABSTHTMLTag::setOnBlur()
Sets the value of the blur-attribute of this html-tag.
ABSTHTMLTag::setOnClick()
Sets the value of the click-attribute of this html-tag.
ABSTHTMLTag::setOnFocus()
Sets the value of the focus-attribute of this html-tag.
ABSTHTMLTag::setOnMouseMove()
Sets the value of the mousemove-attribute of this html-tag.
ABSTHTMLTag::setOnMouseOut()
Sets the value of the mouseout-attribute of this html-tag.
ABSTHTMLTag::setOnMouseOver()
Sets the value of the mouseover-attribute of this html-tag.
ABSTHTMLTag::setOnMouseUp()
Sets the value of the mouseup-attribute of this html-tag.
ABSTHTMLTag::setStyle()
Set the value of the class-attribute of this tag.

Class: ABSTObject

ABSTObject::printComplexData()
Prints out the more complex data by the given array.
ABSTObject::printPrimitiveData()
Prints out the primitive data by the given arrays.
ABSTObject::printStructure()
Prints out the Structure of this Object.
ABSTObject::same()
Checks whether the passed object reference points to this object.
ABSTObject::sameReferences()
Compares two references whether they points to the same object

Class Details

[line 65]
A class to generate contact forms. After submit there will be generate a plaintext email to a recipient.

You also can use this class for an object of an e-mail, with all its necessary information. If you add an e-mail address as target, you should know that you can do it in two different ways. You can only declare a plain e-mail address such as "nobody@nowhere.no" or you can additionally declare some Information such as name of the receiver. In this case you have to enclose the e-mail address in brackets like "<>". The full example is "\"Firstname Surname\" <nobody@nowhere.no>".




Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  0.2.0
copyright:  

Copyright (C) 2003 Daniel Plücken <daniel@debakel.net>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

since:  0.4.5.6
license:  GNU Lesser General Public License


[ Top ]


Class Variables

$email_obj =  ""

[line 73]

Reference to the email-object which should be send.



Tags:

access:  public

Type:   EMail


[ Top ]



Class Methods


constructor ContactForm [line 90]

ContactForm ContactForm( string $email, [string $name = "DP_form"], [string $onSubmitOrder = ""], [string $targetFile = ""], [string $method = "POST"])

Constructor



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.0
access:  public


Parameters:

string   $email  
string   $name  
string   $onSubmitOrder  
string   $targetFile  
string   $method  

[ Top ]

method addTargetEmailBlindCopy [line 175]

void addTargetEmailBlindCopy( string $string)

Adds an email to the array of emails where the message should be send in blind copy.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.8
access:  public


Parameters:

string   $string  

[ Top ]

method addTargetEmailCopy [line 144]

void addTargetEmailCopy( string $string)

Adds an email to the array of emails where the message should be send in copy.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.8
access:  public


Parameters:

string   $string  

[ Top ]

method get [line 274]

string get( HTMLTable $obj_ref, boolean $php_code)

Returns a generated string based on the Attributes of this HTML-Object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Overrides HTMLForm::get() (Returns a generated string based on the Attributes of this HTML-Object.)

Parameters:

HTMLTable   $obj_ref   A reference of a table by dint of the form should be formatted. The form items will be placed in the table where the string "[item]" appears.
boolean   $php_code   Is this parameter true, the form will be returned as the source-php-code of this object.

[ Top ]

method getPHPSource [line 222]

string getPHPSource( )

Generates the sourcecode to build this object and returns it.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


Overrides HTMLForm::getPHPSource() (Generates the sourcecode to build this object and returns it.)

[ Top ]

method getTargetEmail [line 113]

string getTargetEmail( )

Returns the stored email.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.0
access:  public


[ Top ]

method send [line 208]

boolean send( string $sender_email, string $subject, [string $content = ""])

Sends the email with values of the form to the addressee stored in $this->target_email.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.8
access:  public


Parameters:

string   $sender_email  
string   $subject  
string   $content  

[ Top ]

method setTargetEmail [line 128]

void setTargetEmail( string $string)

Stores the email where the message should be send.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

string   $string  

[ Top ]

method setTargetEmailBlindCopyArray [line 190]

void setTargetEmailBlindCopyArray( array $array)

Stores the emails where the message should be send in blind copy.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.8
access:  public


Parameters:

array   $array  

[ Top ]

method setTargetEmailCopyArray [line 159]

void setTargetEmailCopyArray( array $array)

Stores the emails where the message should be send in copy.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.8
access:  public


Parameters:

array   $array  

[ Top ]


Documentation generated on Thu, 05 Jun 2008 19:10:27 +0200 by phpDocumentor 1.4.1