ValidForm Builder

Easy and safe XHTML 1.0 strict forms with validation!

Contents

The ValidForm class

Introduction

Description of the class

Class synopsis

ValidForm {
	void setSubmitLabel(string $label)
	object addFieldset(string $label, string $noteHeader, string $noteBody)	
	object addField(string $name, string $label, int $type, array $validationRules, array $errorHandlers, array $meta, bool $blnJustRender)
	object addParagraph(string $strBody, string $strHeader)
	object addArea(string $label, bool $active, string $name, bool $checked, array $meta)
	object addMultiField(string $label, array $meta)
	void addJSEvent(string $strEvent, string $strMethod)
	string toHtml(void)
	bool isSubmitted(void)
	object getFields(void)
	object getValidField(string $id)
	bool isValid(void)
	string valuesAsHtml(bool $hideEmpty)
	static get(string $param, string $replaceEmpty)
}

Table of Contents

ValidForm→__construct — Creates a new ValidForm object
ValidForm→addArea — Add an area to the ValidForm object
ValidForm→addField — Add a field to the ValidForm object
ValidForm→addFieldset — Adds a fieldset to the ValidForm object
ValidForm→addJSEvent — Add a Javascript (jQuery) Event
ValidForm→addMultiField — Add a multifield to the ValidForm object
ValidForm→addParagraph — Add a paragraph to the ValidForm object
ValidForm→getFields — Get all ValidForm fields
ValidForm→getValidField — Get a specific valid field
ValidForm→isSubmitted — Check if the form is submitted
ValidForm→isValid — Check if all the fields are valid
ValidForm→setSubmitLabel — Set the submit label of the ValidForm object
ValidForm→toHtml — Generate the ValidForm
ValidForm→valuesAsHtml — Generate a table containing all the form fields and its values
ValidForm::get — Static function to get request values