<?xml version="1.0"?><phpdoc><class name="Bs_FormField" extends="Bs_FormElement" undoc="false" access="public" package="Form"><file>C:/usr/local/lib/php/blueshoes-4.2/core/html/form/Bs_FormField.class.php</file><doc><author email="andrej@arn.li">andrej arn</author><inherited src="Array"/><overriden src="Array"/><description>basic implementation of an html form field. is never instanced alone,only extended by one of the following classes:- FormFieldText         - FormFieldButton- FormFieldPassword     - FormFieldSubmit- FormFieldRadio        - FormFieldReset- FormFieldCheckbox     - FormFieldSelect- FormFieldImage        - FormFieldTextarea- FormFieldFile         - FormFieldWysiwyg- FormFieldHiddenit has *lots* of properties.dependencies: Bs_FormElement, Bs_String, Bs_LanguageHandler, Bs_EmailValidator,Bs_Array, Bs_HtmlUtil, Bs_Date,</description><shortdescription>Form Field Class</shortdescription><version>4.0.$id$</version><copyright>blueshoes.org</copyright></doc><function name="Bs_FormField" undoc="false" access="public"><doc><return type="void"/><description/><shortdescription>Constructor.</shortdescription></doc></function><function name="&amp;getElement" undoc="false" access="public"><doc><see type="function">getField()</see><see type="function">isExplodable()</see><see type="function">setExplode()</see><parameter name="$optionList" default="null" type="string">(used to return just some of the radio options.)</parameter><return name="" type="string">some html code</return><description>usually you want to use getField(), but if it is an explodable field, you need this.you may use getElement() instead of getField(), that&amp;apos;s no problem.</description><shortdescription>Return some html code to display all the exploded fields on a website in a form.</shortdescription></doc></function><function name="getField" undoc="false" access="private"><doc><return type="void"/><description/><shortdescription>overwrite this method in your subclass.</shortdescription></doc></function><function name="addEnforceCheckbox" undoc="false" access="public"><doc><return name="" type="string">an html checkbox, or an empty string.</return><description/><shortdescription>add enforce checkbox if needed.</shortdescription></doc></function><function name="isExplodable" undoc="false" access="public"><doc><return name="" type="bool"/><description/><shortdescription>tells if this is an explodable field.</shortdescription></doc></function><function name="getAdvancedStyle" undoc="false" access="public"><doc><see type="function">getAdvancedStyleHelper()</see><parameter name="$key" type="string">(see see)</parameter><return name="" type="string"/><throws>bool FALSE (if no-one is set.)</throws><description/><shortdescription>returns the advanced style for the given key.</shortdescription></doc></function><function name="getAdvancedStyleHelper" undoc="false" access="public"><doc><see type="function">getAdvancedStyle()</see><parameter name="$what" default="&amp;apos;caption&amp;apos;" type="string">(default is &amp;apos;caption&amp;apos;, can be &amp;apos;field&amp;apos;.)</parameter><return name="" type="string"/><throws>bool FALSE (if no-one is set.)</throws><description>taking the current mode into account.just say if you want the class name (style) for the caption orthe field, the rest is done here.uses getAdvancedStyle() (returns its value).</description><shortdescription>returns the advanced style for the field itself or the caption,</shortdescription></doc></function><function name="setExplode" undoc="false" access="private"><doc><see type="var">$explodeEval</see><see type="var">$_explodeArray</see><parameter name="$param" default="NULL" type="mixed">(php code as a string, or an array (vector or hash), or nothing.)</parameter><return type="void"/><description>if used, $param should be a string holding some php code that returns anarray. the string will be evaluated (in a separade scope) using eval(), soescape it as you should, rtfm on that. if a parse error occures on your codeor if it doesn&amp;apos;t return an array, it is ignored. you are allowed to accessthe filesystem and databases, but not issueing shell commands in your code.example: (real world example)this is a caption field. but because your app supports different languages,just one string isn&amp;apos;t enough. you want one for each supported language.thing is you don&amp;apos;t know which languages are used. this information is ina global var:$APP[&amp;apos;usedLanguages&amp;apos;] = array(&amp;apos;en&amp;apos;=&amp;gt;&amp;apos;english&amp;apos;, &amp;apos;de&amp;apos;=&amp;gt;&amp;apos;deutsch&amp;apos;, &amp;apos;de_du&amp;apos;=&amp;gt;&amp;apos;deutsch du&amp;apos;, &amp;apos;de_si&amp;apos;=&amp;gt;&amp;apos;deutsch sie&amp;apos;);so every language used should have it&amp;apos;s own caption field.your code for $param then looks like this:$param = &amp;quot;global \$APP; return \$APP[&amp;apos;usedLanguages&amp;apos;];&amp;quot;;now for each element in that returned array, one form element is &amp;apos;exploded&amp;apos;.the name for the form element is the key of the array, the caption is thevalue. for the submitted values, $this-&amp;gt;valueReceived will be an array also,in this case a hash, where the key is &amp;apos;en&amp;apos; for example, and the value is theuser-submitted value. of course this also works with vecors.note: you have 3 possibilities to call this method. one is described above,meaning that you pass some php code. the 2nd is that you pass anarray directly. the 3rd is that you don&amp;apos;t use $param. it will thenupdate $_explodeArray from $explodeEval.</description><shortdescription>explode this field into multiple ones?</shortdescription></doc></function><function name="getLabel" undoc="false" access="private"><doc><see type="var">$this</see><see type="function">getCaptionForFormOutput()</see><parameter name="$useAccessKey" default="TRUE" type="string">if we should &amp;apos;highlight&amp;apos; the access key in the returned label. default = TRUE.</parameter><return name="" type="string">the label tag (html) for this field.</return><description/><shortdescription>Return the label tag (for the current language).</shortdescription></doc></function><function name="inputManipulate" undoc="false" access="public"><doc><parameter name="$paramValue" default="NULL" type="string">(only used internally, for explodable fields) a vector with 2 elements.</parameter><return type="void"/><description>the order for data manipulation is:1) trim2) case3) remove4) removeI (insensitive)5) replace6) replaceIif this is an explodable field, this method calls itself for everyelement.</description><shortdescription>manipulate the user inputs according to the object vars.</shortdescription></doc></function><function name="inputValidate" undoc="false" access="public"><doc><parameter name="$paramValue" default="NULL" type="mixed">(only used internally, for explodable fields.)</parameter><return name="" type="mixed"> (see above)</return><description>the order for data validation is:1) must         5) mustStartWith     9) mustContain    13) bsDataType/bsDataInfo2a) onlyOneOf   6) notStartWith     10) notContain     14) regularExpression2b) onlyIf3) minLength    7) mustEndWith      11) equalTo        15) additionalCheck4) maxLength    8) notEndWith       12) notEqualTo     16) mustBeUniquewhen the first check fails, the method returns. $this-&amp;gt;errorMessage will befilled (or unset if no error).all validating routines are in a separate method to make it isier for subclassesto overwrite and to just use the needed ones.if this is an explodable field, this method calls itself for everyelement.return: (bool)TRUE if the input passed all validation checks successfully.(string) an error message on failure.note: some of the field implementations overwrite this method (checkbox, select,radio, maybe others) so if you update something here, don&amp;apos;t forget those.</description><shortdescription>validate the user inputs according to the object vars.</shortdescription></doc></function><function name="validateMust" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><parameter name="&amp;$vLength" undoc="true"/><return type="void"/><description/><shortdescription>must</shortdescription></doc></function><function name="validateOnlyOneOf" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><return type="void"/><description/><shortdescription>onlyOneOf</shortdescription></doc></function><function name="validateOnlyIf" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><parameter name="&amp;$vLength" undoc="true"/><return type="void"/><description/><shortdescription>onlyIf</shortdescription></doc></function><function name="validateMinLength" undoc="false" access="public"><doc><see type="var">$minLength</see><parameter name="&amp;$v" type="mixed">(the value the user submitted, should be a string here)</parameter><parameter name="&amp;$vLength" type="int">the length of $v. this way we don&amp;apos;t have to do strlen() again.</parameter><return name="" type="mixed"> (bool)TRUE if ok, (string)error message if not.</return><description/><shortdescription>checks the minLength case.</shortdescription></doc></function><function name="validateMaxLength" undoc="false" access="public"><doc><see type="var">$maxLength</see><parameter name="&amp;$v" type="mixed">(the value the user submitted, should be a string here)</parameter><parameter name="&amp;$vLength" type="int">the length of $v. this way we don&amp;apos;t have to do strlen() again.</parameter><return name="" type="mixed"> (bool)TRUE if ok, (string)error message if not.</return><description/><shortdescription>checks the maxLength case.</shortdescription></doc></function><function name="validateMustStartWith" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><return type="void"/><description/><shortdescription>mustStartWith</shortdescription></doc></function><function name="validateNotStartWith" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><return type="void"/><description/><shortdescription>notStartWith</shortdescription></doc></function><function name="validateMustEndWith" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><return type="void"/><description/><shortdescription>mustEndWith</shortdescription></doc></function><function name="validateNotEndWith" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><return type="void"/><description/><shortdescription>notEndWith</shortdescription></doc></function><function name="validateMustContain" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><return type="void"/><description/><shortdescription>mustContain</shortdescription></doc></function><function name="validateNotContain" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><return type="void"/><description/><shortdescription>notContain</shortdescription></doc></function><function name="validateEqualTo" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><return type="void"/><description/><shortdescription>equalTo</shortdescription></doc></function><function name="validateNotEqualTo" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><return type="void"/><description/><shortdescription>notEqualTo</shortdescription></doc></function><function name="validateDataType" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><return type="void"/><description/><shortdescription>bsDataType/bsDataInfo</shortdescription></doc></function><function name="validateRegularExpression" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><return type="void"/><description/><shortdescription>regularExpression</shortdescription></doc></function><function name="validateAdditionalCheck" undoc="false" access="private"><doc><parameter name="&amp;$v" undoc="true"/><parameter name="&amp;$vLength" undoc="true"/><return type="void"/><description/><shortdescription>additionalCheck</shortdescription></doc></function><function name="validateMustBeUnique" undoc="false" access="public"><doc><see type="var">$mustBeUnique</see><parameter name="&amp;$v" type="mixed">(the value the user submitted, should be a string here)</parameter><return name="" type="mixed"> (bool)TRUE if ok, (string)error message if not.&#x0a;@throw bs_exception (which is treated as not-string, so it&amp;apos;s ok.)</return><description>if we fail to do the test, the user-value is accepted.</description><shortdescription>checks the mustBeUnique case. the check is made non-case-sensitive.</shortdescription></doc></function><function name="getVisibility" undoc="false" access="public"><doc><see type="var">$this</see><see type="var">$this</see><return name="" type="string">one of &amp;apos;read&amp;apos;, &amp;apos;readonly&amp;apos;, &amp;apos;show&amp;apos;, &amp;apos;invisible&amp;apos;, &amp;apos;omit&amp;apos;, &amp;apos;normal&amp;apos; (default).</return><description/><shortdescription>returns how this field should be visible and editable to the user.</shortdescription></doc></function><function name="getOnEnterBehavior" undoc="false" access="public"><doc><return name="" type="string"/><description>the var of Bs_Form-&amp;gt;onEnter is used if this-&amp;gt;onEnter is not specified.if not set then the string &amp;apos;nothing&amp;apos; will be returned.</description><shortdescription>tells how this form field should behave when the user hits enter.</shortdescription></doc></function><function name="getOnEnterCode" undoc="false" access="public"><doc><return name="" type="string"> (html/javascript code, may be empty.)</return><description>example return value: &amp;quot;bsEnterSubmit(event,this.form);&amp;quot;the function that takes this string has to merge it into the onKeyDownevents.</description><shortdescription>returns some javascript code (the call) to behave the way the coder wants.</shortdescription></doc></function><function name="applyOnEnterBehavior" undoc="false" access="public"><doc><return type="void"/><description/><shortdescription>merges the onEnter javascript call into the events array if needed.</shortdescription></doc></function><function name="shouldPersist" undoc="false" access="public"><doc><see type="var">$this</see><return name="" type="bool"/><description>it&amp;apos;s possible that it was submitted (by the user), but has to be ignored.i wonder if i should rename this method to shouldUse().</description><shortdescription>tells if the received value should be persisted (used) this time.</shortdescription></doc></function><function name="getDbDataType" undoc="false" access="public"><doc><see type="var">$dbDataType</see><return name="" type="string"/><description>if $dbDataType is not set we have to make something up ourself.</description><shortdescription>returns the db datatype to use for this field.</shortdescription></doc></function><function name="getDbFieldName" undoc="false" access="public"><doc><see type="var">$dbFieldName</see><return name="" type="string"/><description/><shortdescription>returns the db field name you should use for this field.</shortdescription></doc></function><function name="_getMaxLength" undoc="false" access="private"><doc><see type="var">$this</see><see type="var">$this</see><return name="" type="int">a usable maxlength&#x0a;@throw NULL if we cannot make up a logical value.</return><description/><shortdescription>Return a usable maxLength for that field.</shortdescription></doc></function><function name="_getTagStringEvents" undoc="false" access="private"><doc><see type="var">$this</see><return name="" type="string"/><description>example: &amp;quot; onClick=\&amp;quot;javascript:someFunction();\&amp;quot; onMouseOver=\&amp;quot;javascript:someFunction();\&amp;quot;&amp;quot;</description><shortdescription>returns a string with the events that are set.</shortdescription></doc></function><function name="getValue" undoc="false" access="public"><doc><see type="function">_getTagStringValue()</see><see type="var">$this</see><parameter name="$explodeKey" default="NULL" type="mixed">(int or string)</parameter><return name="" type="string"/><description>the value depends on the step the form is in. if the step is 1 thenwe take the valueDefault. otherwise the valueDisplay is used.</description><shortdescription>returns the value.</shortdescription></doc></function><function name="_getTagStringValue" undoc="false" access="private"><doc><see type="function">getValue()</see><parameter name="$explodeKey" default="NULL" type="mixed">(int or string)</parameter><return name="" type="mixed"> (usually string, but may be an array (eg radio fields))</return><description/><shortdescription>returns the value that will be sent to the client browser.</shortdescription></doc></function><function name="_getTagStringStyles" undoc="false" access="private"><doc><see type="var">$this</see><return name="" type="string"/><description>example: &amp;quot; class=\&amp;quot;color: blue\&amp;quot; tabindex=\&amp;quot;10\&amp;quot;&amp;quot;</description><shortdescription>returns a string with the style tags that are set.</shortdescription></doc></function><function name="_getTagStringAdditionalTags" undoc="false" access="private"><doc><see type="var">$this</see><return name="" type="string"/><description>example: &amp;quot; value=&amp;apos;your value&amp;apos; checked&amp;quot;</description><shortdescription>returns a string with the additional tags that are set.</shortdescription></doc></function><function name="getCaption" undoc="true" access="private"><doc><see type="var">$this</see><see type="var">$this</see><see type="function">getCaptionForFormOutput()</see><parameter name="$useAccessKey" default="TRUE," type="string">if we should &amp;apos;highlight&amp;apos; the access key in the returned caption. default = TRUE.</parameter><parameter name="$lang" default="null" type="string">(default is null. if not given then the lang setting of the form is used.)</parameter><return name="" type="string">the caption for this field.</return><overriden src="Bs_FormElement"/><description>overwrites parent method.</description><shortdescription>Return the caption string (for the current language).</shortdescription></doc></function><function name="getCaptionForFormOutput" undoc="false" access="private"><doc><see type="function">getCaption()</see><parameter name="$useAccessKey" default="TRUE," type="string">if we should &amp;apos;highlight&amp;apos; the access key in the returned caption. default = TRUE.</parameter><parameter name="$lang" default="null" type="string">(default is null. if not given then the lang setting of the form is used.)</parameter><return name="" type="string"> (the caption for this field. usually an html string, not just plaintext.)</return><description/><shortdescription>returns the caption string to use in the form output. so expect html here and not plaintext.</shortdescription></doc></function><function name="getError" undoc="false" access="public"><doc><return name="" type="string">error message</return><description/><shortdescription>returns the error message for the current field, or an empty string if no error.</shortdescription></doc></function><function name="getHelp" undoc="false" access="private"><doc><return type="void"/><description/><shortdescription>returns the help text</shortdescription></doc></function><function name="_highlightAccessKey" undoc="false" access="private"><doc><see type="function">getCaption()</see><see type="function">_getAccessKey()</see><see type="function">getLabel()</see><see type="var">$styles</see><parameter name="$string" type="string"/><return name="" type="string"/><description/><shortdescription>highlight access key in string and return new string</shortdescription></doc></function><function name="_getAccessKey" undoc="false" access="private"><doc><see type="var">$this</see><parameter name="$caption" default="NULL" type="string">you may pass the caption here so it doesn&amp;apos;t need to be fetched again if it&amp;apos;s needed.</parameter><return name="" type="mixed">string a character, or NULL if none.</return><description/><shortdescription>returns the access key letter, if any.</shortdescription></doc></function><function name="getFieldAsHidden" undoc="false" access="public"><doc><parameter name="$explodeKey" default="NULL" type="mixed">(int or string)</parameter><return name="" type="string">some html code</return><description>returns the field like a hidden field, no matter what field type it is.</description><shortdescription>Return some some html code to send to the client. same as getField() but</shortdescription></doc></function><function name="_getFieldNameForHtml" undoc="false" access="private"><doc><parameter name="$name" type="string"/><return name="" type="string"/><description>if the field name is for an array like foo[&amp;apos;bar&amp;apos;] then foo[bar]will be returned.</description><shortdescription>makes the field name html-compatible.</shortdescription></doc></function><function name="hasJavascript" undoc="false" access="public"><doc><return name="" type="bool">TRUE if the client has javascript, FALSE if not.&#x0a;@throw NULL if we don&amp;apos;t know</return><description/><shortdescription>tells whether the client browser has javascript support or not.</shortdescription></doc></function><function name="isMust" undoc="false" access="public"><doc><see type="var">$_must</see><see type="var">$must</see><see type="var">$mustIf</see><see type="var">$mustOneOf</see><see type="var">$mustOneOfIf</see><parameter name="$useCached" default="TRUE," type="string">default is true. in the code we call this method more than once for each field. so this helps for the performance.</parameter><parameter name="$returnString" default="FALSE" type="string">(see above)</parameter><return name="" type="mixed"> (see param $returnType)</return><description>param $returnString:the return of this method used to be bool. now the default is still bool.but you can change that by setting the param $returnString to TRUE.then you&amp;apos;ll get one of &amp;apos;must&amp;apos;, &amp;apos;mustIf&amp;apos;, &amp;apos;mustOneOf&amp;apos;, &amp;apos;mustOneOfIf&amp;apos; or anempty string &amp;apos;&amp;apos; if it&amp;apos;s not a must field.</description><shortdescription>tells if the field has to be filled in according to the current settings.</shortdescription></doc></function><function name="_anyIfCase" undoc="false" access="private"><doc><parameter name="$myIf" type="array">(object var mustIf, onlyIf or mustOneOfIf, so look there.)</parameter><return name="" type="bool">TRUE if it evaluates to TRUE, FALSE otherwise.</return><description/><shortdescription>used for mustIf, onlyIf and mustOneOfIf case. that&amp;apos;s where the (method) name anyIf comes from.</shortdescription></doc></function><function name="_markAsUsed" undoc="false" access="private"><doc><see type="var">$this</see><return type="void"/><description>this method is called from the getField() method in each form fieldimplementation. this way it should work with templates.</description><shortdescription>when a field gets used in a form, it is marked as used.</shortdescription></doc></function><function name="_getBsDataInfoNumber" undoc="false" access="private"><doc><return name="" type="array"> (vector with 2 elements, see above)</return><description>that applies for number values (bsDatType = &amp;apos;number&amp;apos;).element 1 is the lowest number, element 2 the highest number.if a value is not set, null is used instead.possible return value: array(50, null) (means a min number of 50, no max value.)</description><shortdescription>returns a 2-dim vector with the min- and max value specified in bsDataInfo.</shortdescription></doc></function><function name="isFilledIn" undoc="false" access="public"><doc><return name="" type="bool"/><description>input was ok/accepted.</description><shortdescription>tells if the user filled in this field *somehow*. does not tell if the</shortdescription></doc></function><function name="_evalWrap" undoc="false" access="private"><doc><parameter name="$string" undoc="true"/><parameter name="$security" type="string" undoc="true"/><parameter name="$suppressErrors" type="string" undoc="true"/><parameter name="$params" type="array" undoc="true"/><return type="void"/><description>we have it wrapped here so we are in the scope of this call and thuscan use $this-&amp;gt; things.</description><shortdescription>evaluate code in it&amp;apos;s own scope and return what the eval&amp;apos;d code returns.</shortdescription></doc></function><function name="unpersistTrigger" undoc="false" access="public"><doc><return type="void"/><description/><shortdescription>gets executed automatically by the ObjPersister. read there for more info.</shortdescription></doc></function><function name="getErrorMessage" undoc="false" access="public"><doc><parameter name="$errorType" default="&amp;apos;&amp;apos;" type="string"/><parameter name="$params" default="array()" type="array"/><parameter name="$lang" default="NULL" type="string"/><return type="void"/><description/><shortdescription>returns a textual error message for the given error type.</shortdescription></doc></function><function name="&amp;serialize" undoc="true" access="private"><doc><parameter name="$encrypt" type="string" undoc="true"/><return type="void"/></doc></function><function name="unserialize" undoc="true" access="private"><doc><parameter name="&amp;$string" undoc="true"/><parameter name="$decrypt" type="string" undoc="true"/><return type="void"/></doc></function><function name="&amp;encrypt" undoc="true" access="private"><doc><parameter name="$string" undoc="true"/><return type="void"/></doc></function><function name="&amp;decrypt" undoc="true" access="private"><doc><parameter name="$string" undoc="true"/><return type="void"/></doc></function><function name="initFromPost" undoc="true" access="private"><doc><return type="void"/></doc></function><variable name="$_Bs_String" access="private" type="object [unknown]"><doc><description/><shortdescription>a reference to the pseudostatic object Bs_String.</shortdescription></doc></variable><variable name="$_Bs_Array" access="private" type="object [unknown]"><doc><description/><shortdescription>reference to the global pseudostatic Bs_Array.</shortdescription></doc></variable><variable name="$_Bs_HtmlUtil" access="private" type="object [unknown]"><doc><description/><shortdescription>reference to the global pseudostatic Bs_HtmlUtil.</shortdescription></doc></variable><variable name="$_Bs_Date" access="private" type="object [unknown]"><doc><description/><shortdescription>reference to the global pseudostatic Bs_Date.</shortdescription></doc></variable><variable name="$fieldType" access="private" type="string"><doc><description>- text       - checkbox   - hidden   - reset      - wysiwyg- password   - image      - button   - select       (special case, not html, textarea- radio      - file       - submit   - textarea     is used if wysiwyg not supported.)</description><shortdescription>the html field type as in &amp;lt;input type=$fieldType&amp;gt;. one of</shortdescription></doc></variable><variable name="$caption" access="private" type="mixed"><doc><see type="var">$this</see><see type="function">getCaptionForFormOutput()</see><description>your birthday: &amp;lt;input type=text name=birthday&amp;gt;usually a string, can be a hash because it&amp;apos;s language dependant.</description><shortdescription>the title for this field. in this example, the caption is &amp;apos;your birthday&amp;apos;:</shortdescription></doc></variable><variable name="$defaultErrorMessage" access="private" type="array"><doc><see type="var">$this</see><description>example:$defaultErrorMessage[&amp;apos;de&amp;apos;][&amp;apos;must&amp;apos;] = &amp;apos;your error message&amp;apos;;</description><shortdescription>specialized default error messages for that form field.</shortdescription></doc></variable><variable name="$errorMessage" access="private" type="string"><doc><see type="var">$errorType</see><description/><shortdescription>is set with a textual error message if the validation of this field failed.</shortdescription></doc></variable><variable name="$errorType" access="private" type="string"><doc><see type="var">$errorMessage</see><description/><shortdescription>we might need to know which error occured. one of &amp;apos;must&amp;apos;, &amp;apos;onlyOneOf&amp;apos; etc.</shortdescription></doc></variable><variable name="$level" access="private" type="int"><doc><description>the FormContainer uses a public one.fields have to inherit the information from their container. that&amp;apos;s whythis PRIVATE var is here.</description><shortdescription>this var is for internal use only in the formfield!</shortdescription></doc></variable><variable name="$editability" access="public" type="string"><doc><see type="var">$visibility</see><see type="var">$accessRights</see><description>one of [never|once|always]never  =&amp;gt; never :)once   =&amp;gt; only in &amp;apos;add&amp;apos; mode, not in &amp;apos;edit&amp;apos;, &amp;apos;delete&amp;apos; and unknown mode.always =&amp;gt; always :)  (in &amp;apos;add&amp;apos; AND &amp;apos;edit&amp;apos; mode)if it&amp;apos;s not set, it&amp;apos;s treated as editable for this time.</description><shortdescription>is the field editable (now)? also depends on the state we&amp;apos;re in.</shortdescription></doc></variable><variable name="$accessRights" access="private" type="array"><doc><description>KEY       DATA TYPE    EXAMPLE           DESCRIPTION&amp;apos;group&amp;apos;   string       &amp;apos;admin&amp;apos;           user or group, whatever. just a name to identify the ppl.&amp;apos;view&amp;apos;    bool         TRUE|FALSE|NULL   if the user may view the form in view mode.&amp;apos;add&amp;apos;     bool         TRUE|FALSE|NULL   if the user may view the form in add mode (and add records).&amp;apos;edit&amp;apos;    bool         TRUE|FALSE|NULL   if the user may view the form in edit mode (and edit records).&amp;apos;delete&amp;apos;  bool         TRUE|FALSE|NULL   if the user may view the form in delete mode (and delete records).&amp;apos;alter&amp;apos;   bool         TRUE|FALSE|NULL   if the user may view the form in alter mode (and alter the structure).the form has this var too. so accessRights of the formfield overwrite theones of the form. if a key is not set here (or the value is set to NULL)then the value of the form won&amp;apos;t be overwritten.</description><shortdescription>the vector holds hashes with these keys:</shortdescription></doc></variable><variable name="$visibility" access="public" type="string"><doc><see type="var">$editability</see><see type="var">$accessRights</see><description>input field. if $visibility is not set, the visibility/changeability dependson $editability. it will be visible and editable, or visible but not editable.otherwise this value &amp;apos;overwrites&amp;apos; $editability.these values are accepted:FIELD          VISIBLE   EDITABLE    STORE (=use value)- &amp;apos;normal&amp;apos;          x         x          x- &amp;apos;read&amp;apos;            x         -          x- &amp;apos;readonly&amp;apos;        x         -          -- &amp;apos;show&amp;apos;            x         -          -- &amp;apos;invisible&amp;apos;       -         -          x- &amp;apos;omit&amp;apos;            -         -          -some background information for the coder:normal    =&amp;gt; well... field is sent the normal way, value will be used on theserver.read      =&amp;gt; value is not changeable by the user, but will be used on theserver. same as readonly, except it&amp;apos;s used.i have spent about an hour to find names for these vars, anddid not come up with something better. sucks.readonly  =&amp;gt; will make the field hopefully not changeable by the user.eg for a text field that means set the params readonly (html 4.0)and disabled (ie4+)      &amp;lt;input readonly disabled&amp;gt;in some cases we prolly need to omit sending an input field andsend the existing value as raw text so it&amp;apos;s not changeable.if it happens that the user still can change it, it doesn&amp;apos;t mattercause the value will be ignored on the receiving server anyway.conused about the name? and why the value won&amp;apos;t be stored?it&amp;apos;s &amp;quot;read only&amp;quot;, so it can &amp;quot;only be read&amp;quot;, not more.show         shows the value &amp;quot;printed out&amp;quot;. without a form field. just printedout like this text here.invisible =&amp;gt; add the existing (default) value in a &amp;lt;input type=&amp;apos;hidden&amp;apos;&amp;gt;.it&amp;apos;s a little security hole cause someone could change the value.needs to be checked on the server side (todo).omit      =&amp;gt; field/value are not sent at all. however, it&amp;apos;s possible that someinvisible information is sent so the receiving server knows thisfield exists.caution: see vars $equalTo and $notEqualTo.</description><shortdescription>it&amp;apos;s possible that we may not allow the user to change the value of this</shortdescription></doc></variable><variable name="$isUsed" access="private" type="string">FALSE<doc><see type="var">$this</see><description>will be used on the server side, means if visibility evaluates to &amp;apos;normal&amp;apos;,&amp;apos;read&amp;apos; or &amp;apos;invisible&amp;apos;. not if it&amp;apos;s &amp;apos;readonly&amp;apos; cause the value won&amp;apos;t be used, andnot if it&amp;apos;s &amp;apos;omit&amp;apos; of course. default is FALSE.</description><shortdescription>tells if the field is used in the form. will be set to true if the field value</shortdescription></doc></variable><variable name="$valueDefault" access="private" type="mixed"><doc><see type="var">$valueDefaultType</see><see type="function">getValue()</see><description>may be a string or a hash cause it&amp;apos;s language dependant.for a multiple select field it&amp;apos;s even worse. because of this, the followingdata structures are allowed:for all fields except select:string and hash:1) $valueDefault = &amp;apos;foobar&amp;apos;;2) $valueDefault = array(&amp;apos;en&amp;apos;=&amp;gt;&amp;apos;foobar&amp;apos;, &amp;apos;de&amp;apos;=&amp;gt;&amp;apos;hello world&amp;apos;);only for select: (no matter if they are multiple or not)string, vector, hash (key=language), hash (key=language) holding vectors1) $valueDefault = &amp;apos;foobar&amp;apos;;2) $valueDefault = array(&amp;apos;foo&amp;apos;, &amp;apos;bar&amp;apos;);3) $valueDefault = array(&amp;apos;en&amp;apos;=&amp;gt;&amp;apos;foobar&amp;apos;, &amp;apos;de&amp;apos;=&amp;gt;&amp;apos;hello world&amp;apos;);4) $valueDefault = array(&amp;apos;en&amp;apos;=&amp;gt;array(&amp;apos;foo&amp;apos;, &amp;apos;bar&amp;apos;), &amp;apos;de&amp;apos;=&amp;gt;array(&amp;apos;hello&amp;apos;, &amp;apos;world&amp;apos;));yes, this causes a problem cause 2) and 3) are both just arrays. but it can be done.if this is an explodable field, the default value will be used in every explodedfield. you cannot specify an array here to have another default value in eachexploded field.//if it&amp;apos;s not a select field  //--huh? what should that comment?</description><shortdescription>the default value for that field.</shortdescription></doc></variable><variable name="$valueDefaultType" access="private" type="string"><doc><see type="var">$valueDefault</see><see type="function">getValue()</see><description>want some php code to execute to make up the default value. or, for multiple selectfields, the default value may be an array. that&amp;apos;s what this var is for.the value (maybe inside a hash because of the language dependency) can be one of:&amp;apos;text&amp;apos;  =&amp;gt; default. hardcoded default value.&amp;apos;code&amp;apos;  =&amp;gt; some php code that returns a string. may return an array for multiple selectfields only. executed in the scope of this class ($this-&amp;gt;_evalWrap()).&amp;apos;field&amp;apos; =&amp;gt; the user-supplied value of another field of a previous level (multi-level forms.)&amp;apos;array&amp;apos; =&amp;gt; only for multiple select fields: when the default value is changed in the guiand the changes get submitted, the php code has to be executed so we can storethe php array in $valueDefault. this case is needed cause we (hardly) can&amp;apos;tsubmit a php array with an html form directly. example:return array(&amp;apos;yes&amp;apos;=&amp;gt;&amp;apos;Yes&amp;apos;, &amp;apos;no&amp;apos;=&amp;gt;&amp;apos;No&amp;apos;, &amp;apos;validate&amp;apos;=&amp;gt;&amp;apos;Validate&amp;apos;);a spreadsheet field needs an array aswell.</description><shortdescription>sometimes you may not be satisfied with a hardcoded default value for a field. you</shortdescription></doc></variable><variable name="$valueReceived" access="private" type="mixed"><doc><description>a select field cause it can have multiple values.it&amp;apos;s an array holding the same thing as usual if this is an explodable field.</description><shortdescription>the value we received directly from the user. usually a string, may be a vector if it is</shortdescription></doc></variable><variable name="$valueDisplay" access="private" type="string">NULL<doc><description>usually a string, may be a vector if it is a select field cause it can have multiple values.it&amp;apos;s an array holding the same thing as usual if this is an explodable field.</description><shortdescription>the value we will display to the user/browser when we show the form (again).</shortdescription></doc></variable><variable name="$valueInternal" access="private" type="string">NULL<doc><description>usually a string, may be a vector if it is a select field cause it can have multiple values.it&amp;apos;s an array holding the same thing as usual if this is an explodable field.</description><shortdescription>the value we use internally, eg to store in the database.</shortdescription></doc></variable><variable name="$saveToDb" access="private" type="string">NULL<doc><description>example: a checkbox &amp;quot;do you agree to the conditions&amp;quot; doesn&amp;apos;t need to be saved.</description><shortdescription>save the value of this field to the db or not?</shortdescription></doc></variable><variable name="$dbFieldName" access="private" type="string"><doc><see type="var">$this</see><description>be used with a prefix (so we don&amp;apos;t get in troubles because of reserved names).you may set something here, then exactly this name will be used instead.consider using the same value as for $this-&amp;gt;name.</description><shortdescription>i suggest you don&amp;apos;t set anything here. if you don&amp;apos;t, the var $this-&amp;gt;name will</shortdescription></doc></variable><variable name="$dbDataType" access="private" type="string"><doc><see type="var">$this</see><description>if not specified, we have to make something up somehow, see getDbDataType().something like &amp;apos;varchar&amp;apos;, &amp;apos;int&amp;apos;, ...</description><shortdescription>the data type of the database field.</shortdescription></doc></variable><variable name="$dbNotNull" access="public" type="bool"><doc><description/><shortdescription>if the db field is or should be defined NOT NULL.</shortdescription></doc></variable><variable name="$dbPrimaryKey" access="public" type="bool"><doc><description/><shortdescription>if the db field is or should be defined NOT NULL.</shortdescription></doc></variable><variable name="$dbKey" access="public" type="bool"><doc><description/><shortdescription>if the db field is or should be defined as key.</shortdescription></doc></variable><variable name="$dbIndexFulltext" access="public" type="bool"><doc><description/><shortdescription>if the db field is or should be defined as fulltext index.</shortdescription></doc></variable><variable name="$dbAutoIncrement" access="public" type="bool"><doc><description/><shortdescription>if the db field is or should be defined as auto increment field.</shortdescription></doc></variable><variable name="$dbUnique" access="public" type="bool"><doc><description/><shortdescription>if the db field is or should be defined UNIQUE.</shortdescription></doc></variable><variable name="$dbForeignKey" access="public" type="array"><doc><description>the hash has the following keys:KEY       DATATYPE    COMMENTSmultiple  bool        if it&amp;apos;s a 1:x or n:x relation.dns       array       hash with the following keys (just as every dns hash):&amp;apos;host&amp;apos;&amp;apos;port&amp;apos;&amp;apos;syntax&amp;apos;&amp;apos;type&amp;apos;&amp;apos;user&amp;apos;&amp;apos;pass&amp;apos;if anything is set here then a new db connection will be opened.be aware of the fact that this data has to be stored along with theform settings, and that isn&amp;apos;t very secure. ...db        string      if not set then it&amp;apos;s the same.table     stringfield     string      that should be the field &amp;apos;ID&amp;apos; but can be different in some cases.showAs    string      if multiple is TRUE:  one of &amp;apos;select&amp;apos; (default), &amp;apos;radio&amp;apos;,    &amp;apos;flipflop&amp;apos;.if multiple is FALSE: one of &amp;apos;select&amp;apos; (default), &amp;apos;checkbox&amp;apos;, &amp;apos;flipflop&amp;apos;.caption   mixed       the field that should be used to display on the page (eg in the select field).usually the field &amp;apos;caption&amp;apos;.this setting may be language dependant, thus it can be a string or a lang-hash.value     mixed       the field that should be used as key on the page (eg in the select field).should be the field &amp;apos;ID&amp;apos;.this setting may be language dependant, thus it can be a string or a lang-hash.rules:if this field ends with &amp;apos;ID&amp;apos; (eg &amp;apos;carID&amp;apos;) then it&amp;apos;s a x:1 relation. (x of this one have 1 car each)if this field ends with &amp;apos;IDs&amp;apos; (eg &amp;apos;carIDs&amp;apos;) then it&amp;apos;s a x:n relation. (x of this have n cars each)</description><shortdescription>if not set or not an array or empty then it&amp;apos;s not a foreign key.</shortdescription></doc></variable><variable name="$dbAttributes" access="public" type="unknown"><doc><description/><shortdescription>additional db attributes as the db told us. comma-separated or so, i think. dunno really.</shortdescription></doc></variable><variable name="$explodeEval" access="private" type="string"><doc><see type="function">setExplode()</see><see type="function">isExplodable()</see><see type="var">$_explodeArray</see><description/><shortdescription>special case. the content of this string will be evaluated.</shortdescription></doc></variable><variable name="$_explodeArray" access="private" type="array"><doc><see type="function">setExplode()</see><see type="function">isExplodable()</see><see type="var">$explodeEval</see><description/><shortdescription/></doc></variable><variable name="$direction" access="private" type="string"><doc><description>one of ltr (left to right) &amp;lt;= defaultrtl (right to left)ie5+ only. not set means ltr, which won&amp;apos;t be written to the browser.</description><shortdescription>the direction in which the text is written in that field, as in &amp;lt;input dir=&amp;quot;ltr&amp;quot;&amp;gt;</shortdescription></doc></variable><variable name="$styles" access="private" type="array"><doc><see type="var">$this</see><description>- string class- string id- string style- (*) char accessKey[]a char or an associative array cause it&amp;apos;s language dependant.- int tabIndex (ie4+)- (*) mixed title[]a string or an associative array cause it&amp;apos;s language dependant.appears as a tool tip over the field.- (*) mixed label[] (ie4+)a string or an associative array cause it&amp;apos;s language dependant.i really don&amp;apos;t recommend to use that setting instead of the caption.(*) these options are not available in the gui. problem with explodable holding explodable.check your html documentation for details.</description><shortdescription>associative array with style information. these keys can be used:</shortdescription></doc></variable><variable name="$advancedStyles" access="private" type="unknown"><doc><description>of the bs_form is used if set.</description><shortdescription>it&amp;apos;s the same. the value of this object is read first, and if it&amp;apos;s not set, then the one</shortdescription></doc></variable><variable name="$events" access="private" type="array"><doc><see type="var">$this</see><description>the currently (2001/04/27) available events are:- onFocus    - onClick       - onMouseOver   - onKeyDown- onBlur     - onDblClick    - onMouseMove   - onKeyUp- onSelect   - onMouseDown   - onMouseOut- onChange   - onMouseUp     - onKeyPressnote: some field types do not support all 12 events.set the keys exactly like written above (case). otherwise we get in troublewhen merging more events into one, and there may be bugs.example:$events[&amp;apos;onClick&amp;apos;] = &amp;quot;javascript:someFunction();&amp;quot;;will look like: &amp;lt;input onClick=&amp;quot;javascript:someFunction();&amp;quot;&amp;gt;that means: if you want the word &amp;quot;javascript:&amp;quot; included, *you*have to add it yourself. because it could also be vbscript or whatever.</description><shortdescription>(javascript) events like onClick, ...</shortdescription></doc></variable><variable name="$onEnter" access="private" type="string"><doc><description>if this var is set, it overwrites one value of Bs_Form-&amp;gt;onEnter.</description><shortdescription>see var Bs_Form-&amp;gt;onEnter for description and details.</shortdescription></doc></variable><variable name="$additionalTags" access="private" type="mixed"><doc><see type="var">$this</see><description>supported by these classes.examples:$additionalTags = array(&amp;quot;value=&amp;apos;your value&amp;apos;&amp;quot;, &amp;quot;checked&amp;quot;);=&amp;gt; &amp;lt;input name=&amp;quot;name&amp;quot; ...   value=&amp;apos;your value&amp;apos; checked&amp;gt;$additionalTags = &amp;quot;value=&amp;apos;your value&amp;apos; checked&amp;quot;;=&amp;gt; &amp;lt;input name=&amp;quot;name&amp;quot; ...   value=&amp;apos;your value&amp;apos; checked&amp;gt;CAUTION: you really can fuck up things here. be warned.these 2 example values are no good:value=&amp;apos;tom&amp;apos;s pizzaland&amp;apos; maxlength=&amp;apos;15&amp;apos;value=&amp;quot;my nickname is &amp;quot;tom&amp;quot; -&amp;gt; cool heh?&amp;quot; checkedin the 1st example, the problem is the &amp;apos;in the 2nd example, the problems are the &amp;quot; and the &amp;gt;you have to convert such characters first.please see/use Html/Bs_HtmlUtil.class.php-&amp;gt;filterForHtml().note  I: it&amp;apos;s *not* an associative array where you do key=value.note II: in the gui implementation, only the string version is supported (no vector).</description><shortdescription>maybe you&amp;apos;d like to add more properties to the html tags, some that are not</shortdescription></doc></variable><variable name="$bsDataType" access="private" type="string"><doc><description>- number- boolean- text- blob- html- email- url- username- password- zipcode- price- creditcard- ip- domain- host- date- time- month- year- datetime- timestamp- phone- firstname- lastname//middlename fullname//fileUpload//img//path//fileof course some combinations, like &amp;quot;textarea =&amp;gt; username&amp;quot;, make no sense.</description><shortdescription>the internal data type that we expect to receive. one of:</shortdescription></doc></variable><variable name="$bsDataInfo" access="private" type="string"><doc><description>sometimes it&amp;apos;s not enough to know what data type we have to deal with,it could help us to have additional information.number   =&amp;gt; string: number range. eg &amp;apos;-5000|+9999&amp;apos; which means from -5000 to +9999. the + sign is voluntary.text     =&amp;gt; int     1 = any characters, 2 = a-zA-Z0-9, 3 = a-zA-Zhtml     =&amp;gt; bool:   validate the html code or not?email    =&amp;gt; int:    1 = syntax validation, 2 = 1+ host validation, 3 = 1+2+ account validationurl      =&amp;gt; int:    1 = syntax validation, 2 = 1+ host validation, 3 = 1+2+ url validationpassword =&amp;gt; int:    1 = anything, 2 = no forbidden password, 3 = 2 + no dictionary word,4 = 2+3+ need alpha/num combination, 5 = 2+3+4+ special characterzipcode  =&amp;gt; int:    1 = anything,10 = us syntax, 11 = us valid,20 = ca syntax, 21 = ca valid,30 = de syntax, 31 = de valid,40 = ch syntax, 41 = ch valid,price    =&amp;gt; int:    1 = anything, 2 = only a number (eg &amp;quot;1599.90&amp;quot;), 3 = can have characters a-zA-Z (eg &amp;quot;usd 1599.90&amp;quot;)date     =&amp;gt; int:    1 = anything, 2 = anything that evaluates to a date,3 = us (eg &amp;apos;2001/12/31&amp;apos;), 4 = eu (eg &amp;apos;31.12.2001&amp;apos;)month    =&amp;gt; int:    1 = anything, 2 = anything that evaluates to a month,3 = digit (eg &amp;apos;12&amp;apos;), 4 = string (eg &amp;apos;december&amp;apos;)year     =&amp;gt; int:    1 = anything, 2 = 4 digits required, 3 = 2 digits accepted where &amp;lt;=30 = 2030, &amp;gt;=31 = 1931datetime =&amp;gt; int:    1 = anything, 2 = anything that evaluates to a datetime,3 = us (eg &amp;apos;2001/12/31 24:59:59&amp;apos;), 4 = eu (eg &amp;apos;31.12.2001 24:59:59&amp;apos;)phone    =&amp;gt; int     1 = anything40 = ch any41 = ch fixnet42 = ch cellthe first option is always the default.</description><shortdescription>additional information to the $bsDataType.</shortdescription></doc></variable><variable name="$bsDataManipulation" access="private" type="unknown"><doc><description>the manipulations are not visible to the user, which means $valueInternal is changedwhile $valueDisplay is not.number   =&amp;gt;text     =&amp;gt;html     =&amp;gt; idea: tagsToUpper/tagsToLoweremail    =&amp;gt;url      =&amp;gt;password =&amp;gt;price    =&amp;gt; int:    1 = work around floating pointeg user submits &amp;quot;135.15&amp;quot;, we do *100 = &amp;quot;13515&amp;quot;. when displaying we do/ 100 so it is &amp;quot;135.15&amp;quot; again.date     =&amp;gt; int:    1 = to us format (eg &amp;apos;2001/12/31&amp;apos;), 2 = to eu format (eg &amp;apos;31.12.2001&amp;apos;)month    =&amp;gt;year     =&amp;gt;datetime =&amp;gt; int:    1 = to us format (eg &amp;apos;2001/12/31 24:59:59&amp;apos;),2 = to eu format (eg &amp;apos;31.12.2001 24:59:59&amp;apos;),3 = to mysql format (eg &amp;apos;2001-12-31 24:59:59&amp;apos;),4 = to mysql timestamp (eg &amp;apos;20011231245959&amp;apos;),5 = to unix timestamp,6 = to gmt7 = 1 + 68 = 2 + 69 = 3 + 610 = 4 + 611 = 5 + 6</description><shortdescription>some datatypes may be modified in some standard way. this depends on $bsDataType.</shortdescription></doc></variable><variable name="$bsDataManipVar" access="private" type="unknown"><doc><description>the data. that&amp;apos;s what this var is for.example: we&amp;apos;ve got a datetime value, and we should convert it to gmt. but what&amp;apos;s thedifference between the value we&amp;apos;ve got and gmt? this var should tell...if used, $bsDataManipVar must be a vector with exactly 2 elements. element 0 tellsthe value type, element 1 is the (mixed) value.$bsDataManipVar[0] = [&amp;apos;hard&amp;apos;|&amp;apos;eval&amp;apos;];$bsDataManipVar[1] = &amp;apos;something&amp;apos;;</description><shortdescription>sometimes $bsDataManipulation needs additional information to know how to manipulate</shortdescription></doc></variable><variable name="$enforce" access="private" type="array"><doc><description>hash holding bool values. if a key/value pair is not set, it means FALSE.every validating class var can have an entry in this array. these are:must, mustIf, mustOneOf, mustOneOfIf, onlyOneOf, onlyIf, minLength, maxLength, mustStartWithnotStartWith, mustEndWith, notEndWith, mustContain, notContain, equalTonotEqualTo, mustBeUnique, regularExpression, additionalCheckexample:   the user is asked to type in an url. $bsDataType is &amp;apos;url&amp;apos; and$bsDataInfo is &amp;apos;2&amp;apos;. now he types in his website, but unfortunatelythe host check fails because a) the server is currently down orb) the domain will be activated tomorrow or whatever. the userdoesn&amp;apos;t want to wait and come back when the problem is fixed, hewants to do it now, and you want to allow it. what you do isyou set $enforce[&amp;apos;bsDataInfo&amp;apos;] to true so when he submits, he&amp;apos;llget the form again with the error shown, but with a checkbox thatsays &amp;quot;enforce&amp;quot; to allow the user to ignore the error.take care: imagine an input field with minLength=10 and notStartWith=&amp;apos;hello&amp;apos;.now if the user types in &amp;apos;hello&amp;apos; and he&amp;apos;s allowed to enforce theminLength check, this *may not* skip the notStartWith check!</description><shortdescription>enforce settings for validating rules.</shortdescription></doc></variable><variable name="$_must" access="private" type="string"><doc><see type="function">isMust()</see><description>2002/04/15 --andrej:this used to be a bool, but it is a string now telling which must casesaid that it was a must case. possibilities:must, mustIf, mustOneOf, mustOneOfIfif it&amp;apos;s not a must field then it&amp;apos;s empty (not set or empty string).</description><shortdescription>computed must value, cached from isMust().</shortdescription></doc></variable><variable name="$must" access="private" type="bool"><doc><description/><shortdescription>tells whether the field has to be filled out or not.</shortdescription></doc></variable><variable name="$mustIf" access="private" type="array"><doc><description>the vector holds hashes with these 4 elements:1) operator =&amp;gt; one of &amp;apos;&amp;&amp;apos; or &amp;apos;|&amp;apos;. &amp; means AND while | means OR.default is &amp;apos;|&amp;apos;.2) field    =&amp;gt; the input field.3) compare  =&amp;gt; the way we compare the value. one of =, &amp;gt;, &amp;lt;, &amp;gt;=, &amp;lt;=, !=, s, !s  (s = soundex equal, !s = not soundex equal).default is &amp;apos;=&amp;apos;.the compare is made like &amp;quot;field &amp;gt;= value&amp;quot; so the field is on the left,the value is on the right side. this matters.4) value    =&amp;gt; the value to be compared.if not set, anything != &amp;apos;&amp;apos; is treated as &amp;quot;matches&amp;quot;. this is usefulespecially for cases where you want to have a field filled out whenanother field is - or is not. for example a checkbox where you are notsure if the value will be 1, &amp;apos;1&amp;apos; or TRUE.example:we absolutely need the email address of a person filling out a form if the person eitherwants to receive our newsletter or orders one of our products.$mustIf = array(array(&amp;apos;operator&amp;apos;=&amp;gt;&amp;apos;|&amp;apos;, &amp;apos;field&amp;apos;=&amp;gt;&amp;apos;wantNewsletter&amp;apos;, &amp;apos;compare&amp;apos;=&amp;gt;&amp;apos;=&amp;apos;, &amp;apos;value&amp;apos;=&amp;gt;&amp;apos;yes&amp;apos;),array(&amp;apos;operator&amp;apos;=&amp;gt;&amp;apos;|&amp;apos;, &amp;apos;field&amp;apos;=&amp;gt;&amp;apos;orderAmount&amp;apos;,    &amp;apos;compare&amp;apos;=&amp;gt;&amp;apos;&amp;gt;&amp;apos;, &amp;apos;value&amp;apos;=&amp;gt;&amp;apos;0&amp;apos;),)in php code, this would be: (($wantNewsletter == &amp;apos;yes&amp;apos;) || ($orderAmount &amp;gt; 0))ignored if $must is TRUE.it&amp;apos;s on purpose that this is not language dependant cause i cannot think of anexample where it would be of any use and it would make things alot more complicated.i can see problems with the fucked up php datatypes. compares are made == not ===.please test your code.</description><shortdescription>the field turns into a must field if the condition evaluates to true.</shortdescription></doc></variable><variable name="$mustOneOf" access="private" type="array"><doc><description>ignored if $must or $mustIf is or evaluates to TRUE.</description><shortdescription>at least one of (the fields in that array + this field) have to be filled out.</shortdescription></doc></variable><variable name="$mustOneOfIf" access="private" type="array"><doc><description>the condition evaluates to true. otherwise none of the fields are mandatory.this is a combination of mustIf and mustOneOf.data structure:it&amp;apos;s a hash with the two keys&amp;apos;fields&amp;apos;    =&amp;gt; array, exactly the same as for the $mustOneOf var.&amp;apos;condition&amp;apos; =&amp;gt; array, exactly the same as for the $mustIf var.ignored if $must, $mustIf or $mustOneOf is or evaluates to TRUE.</description><shortdescription>at least one of (the fields in that array + this field) have to be filled in IF</shortdescription></doc></variable><variable name="$onlyOneOf" access="private" type="array"><doc><description/><shortdescription>only one of (the fields in that array + this field) may be filled out.</shortdescription></doc></variable><variable name="$onlyIf" access="private" type="array"><doc><description>in other words: it may only be filled in if ... .it is a very similar thing like the mustIf option. so look there fordetails/description.new since 2002/03/12 --andrej</description><shortdescription>the field turns into an only-field if the condition evaluates to true.</shortdescription></doc></variable><variable name="$onlyOneOfIf" access="private" type="unknown"><doc><description/><shortdescription/></doc></variable><variable name="$minLength" access="private" type="int"><doc><description>a value shorter than $minLength is not accepted while an empty value is.note  I: for the field types &amp;apos;checkbox&amp;apos; and &amp;apos;radio&amp;apos; this setting is ignored.because the user cannot do anything about it. it&amp;apos;s up to the webmasternot to do shit.note II: for the field type &amp;apos;select&amp;apos; it&amp;apos;s the number of min. selectable elements.if it doesn&amp;apos;t have the &amp;apos;multiple&amp;apos; property the setting is ignored.</description><shortdescription>the min length the field value needs to be. if it&amp;apos;s not a $must field,</shortdescription></doc></variable><variable name="$maxLength" access="private" type="int"><doc><see type="var">$this</see><description>if the form tag supports it, it will be directly added like this:&amp;lt;input maxlength=$maxLength&amp;gt;it will be checked serverside anyway. someone could hack it.if not set, it&amp;apos;ll be something that makes sense based on $bsDataType:number =&amp;gt;    20       username   =&amp;gt; 20       domain   =&amp;gt; 80       datetime =&amp;gt; 19text   =&amp;gt;   500       password   =&amp;gt; 20       host     =&amp;gt; 80       timestamp =&amp;gt; 8blob   =&amp;gt; 65535       zipcode    =&amp;gt; 10       date     =&amp;gt; 10html   =&amp;gt; 65535       price      =&amp;gt; 20       time     =&amp;gt;  8email  =&amp;gt;    80       creditcard =&amp;gt; 16       month    =&amp;gt;  2url    =&amp;gt;   200       ip         =&amp;gt; 15       year     =&amp;gt;  4there&amp;apos;s room for more logic: if the value is made up based on $bsDataType (list above)and $dbDataType is set, the value should be no bigger than the db field types max length,eg char/varchar=255, int=11, blob=65535, ...note  I: for the field types &amp;apos;checkbox&amp;apos; and &amp;apos;radio&amp;apos; this setting is ignored.because the user cannot do anything about it. it&amp;apos;s up to the webmasternot to do shit.note II: for the field type &amp;apos;select&amp;apos; it&amp;apos;s the number of max. selectable elements.if it doesn&amp;apos;t have the &amp;apos;multiple&amp;apos; property the setting is ignored.</description><shortdescription>the max length the field value can be.</shortdescription></doc></variable><variable name="$mustStartWith" access="private" type="array"><doc><description>not case sensitive. language dependant.examples:$mustStartWith = array(&amp;apos;hi&amp;apos;, &amp;apos;hello&amp;apos;);$mustStartWith = array(&amp;apos;en&amp;apos;=&amp;gt;array(&amp;apos;hi&amp;apos;,&amp;apos;hello&amp;apos;), &amp;apos;de&amp;apos;=&amp;gt;&amp;apos;hallo&amp;apos;, &amp;apos;fr&amp;apos;=&amp;gt;array(&amp;apos;salut&amp;apos;,&amp;apos;bonjour&amp;apos;));not allowed data structures:$mustStartWith = &amp;apos;hello&amp;apos;;                           =&amp;gt; use: array(&amp;apos;hello&amp;apos;)$mustStartWith = array(&amp;apos;en&amp;apos;=&amp;gt;&amp;apos;hi&amp;apos;, &amp;apos;de&amp;apos;=&amp;gt;&amp;apos;hallo&amp;apos;);  =&amp;gt; use: array(&amp;apos;en&amp;apos;=&amp;gt;array(&amp;apos;hi&amp;apos;), &amp;apos;de&amp;apos;=&amp;gt;array(&amp;apos;hallo&amp;apos;));note: setting is ignored for the types select and radio.</description><shortdescription>the field input has to start with one of these values.</shortdescription></doc></variable><variable name="$notStartWith" access="private" type="unknown"><doc><description/><shortdescription>see $mustStartWith</shortdescription></doc></variable><variable name="$mustEndWith" access="private" type="unknown"><doc><description/><shortdescription>see $mustStartWith</shortdescription></doc></variable><variable name="$notEndWith" access="private" type="unknown"><doc><description/><shortdescription>see $mustStartWith</shortdescription></doc></variable><variable name="$mustContain" access="private" type="unknown"><doc><description/><shortdescription>see $mustStartWith</shortdescription></doc></variable><variable name="$notContain" access="private" type="unknown"><doc><description/><shortdescription>see $mustStartWith</shortdescription></doc></variable><variable name="$equalTo" access="private" type="mixed"><doc><description>may be useful for 2 password fields, one to confirm.usually a string, may also be a vector array of strings.note  I:  we only compare the data, not the datatype. (== not ===)note II:  this could cause some headache. imagine that this fieldhas to equal another value, but for some reason, the otherfield was not sent (not editable, not visible to this user, ...).now what? we are not able to compare... we&amp;apos;re going withthe following: accept the value, and log this case.it could be fixed when $visibility=omit would send the valuein an encrypted way. see var $visibility. (seems to be on the todo --andrej)note III: setting is ignored for the types select, checkbox and radio.   (seems to be on the todo --andrej)</description><shortdescription>the field input has to be equal to the field(s) specified here.</shortdescription></doc></variable><variable name="$notEqualTo" access="private" type="mixed"><doc><description>may be useful for username/password fields where the password must be different from the username.usually a string, may also be a zero-based array of strings.note  I: we only compare the data, not the datatype. (== not ===)note II: this could cause some headache. imagine that this fieldhas to differ from another value, but for some reason, the otherfield was not sent (not editable, not visible to this user, ...).now what? we are not able to compare... we&amp;apos;re going withthe following: accept the value, (and log this case? todo).it could be fixed when $visibility=omit would send the valuein an encrypted way. see var $visibility.note III: setting is ignored for the types select, checkbox and radio.</description><shortdescription>the field input may not be equal to the field(s) specified here.</shortdescription></doc></variable><variable name="$mustBeUnique" access="private" type="bool"><doc><description>useful for usernames for example. the check is made non-case-sensitive.if we cannot check the uniqueness because of missing or wrong db data,the value is accepted. (this happens on the first insert if the tabledoesn&amp;apos;t exist yet.)note: setting is ignored for the types select and checkbox.   //comment: hrm... review this. maybe this line is here because of a copy/paste error. 2002/03/04 --andrej</description><shortdescription>tells whether the field value must be unique in the db or not.</shortdescription></doc></variable><variable name="$regularExpression" access="private" type="mixed"><doc><description>examples:$regularExpression = &amp;apos;abc&amp;apos;;$regularExpression = array(&amp;apos;abc&amp;apos;, &amp;apos;abc&amp;apos;);$regularExpression = array(&amp;apos;en&amp;apos;=&amp;gt;array(&amp;apos;abc&amp;apos;,&amp;apos;abc&amp;apos;), &amp;apos;de&amp;apos;=&amp;gt;array(&amp;apos;abc&amp;apos;), &amp;apos;fr&amp;apos;=&amp;gt;array(&amp;apos;abc&amp;apos;,&amp;apos;abc&amp;apos;));not allowed data structures:$regularExpression = array(&amp;apos;en&amp;apos;=&amp;gt;&amp;apos;abc&amp;apos;, &amp;apos;de&amp;apos;=&amp;gt;&amp;apos;abc&amp;apos;, &amp;apos;fr&amp;apos;=&amp;gt;&amp;apos;abc&amp;apos;);note: setting is ignored for the types select and radio.usually a string, may also be an array (vector or hash) holding strings or vectors holding strings.</description><shortdescription>regular expression(s) the value has to pass. language dependant.</shortdescription></doc></variable><variable name="$additionalCheck" access="public" type="string"><doc><see type="var">$this</see><see type="var">$codePostLoad</see><see type="var">$this</see><description>you can use this var for a peace of php code. it&amp;apos;ll be evaluated.not language dependant, fork it in your code if needed.if there&amp;apos;s an error in your code, it will be treated as &amp;quot;check was ok&amp;quot;. your codeshould return bool(true), which means check succeeded. or a string or array toindicate that it failed, thus the input won&amp;apos;t be accepted. your return value thenis the error message that&amp;apos;ll be shown to the user. it can be a string, or a hashif you want to offer it in different languages. key=language, value=message.&amp;apos;$v&amp;apos; and special case with explodable fields:to access the value in your code you could do it by using $this-&amp;gt;valueInternal.but it could be an explodable field, which means valueInternal can be an array.if so, $this-&amp;gt;validateAdditionalCheck() (which does the check) is called foreach entry of the array. otherwise it is just called once.to have the right value (the one of the current array element) you always have 2vars in your scope: $v (the value) and $vLength (the string length of $v).i don&amp;apos;t mind if you access $this-&amp;gt;valueInternal directly to do something with thewhole array, but keep in mind that the method is called once for each element.hope you got that.example I:$additionalCheck = &amp;quot;if ($v != &amp;apos;foobar&amp;apos;) {return $this-&amp;gt;errorMessage = array(&amp;apos;en&amp;apos; =&amp;gt; &amp;apos;Input must be foobar.&amp;apos;,&amp;apos;de&amp;apos; =&amp;gt; &amp;apos;Eingabe muss foobar sein.&amp;apos;);} else {return TRUE;}&amp;quot;;example II:$additionalCheck = &amp;quot;if (($this-&amp;gt;hasFormObject()) &amp;&amp; (isSet($this-&amp;gt;_form-&amp;gt;language))) {$lang = $this-&amp;gt;_form-&amp;gt;language;} else {$lang = &amp;apos;en&amp;apos;; //fallback}switch ($lang) {case &amp;apos;de&amp;apos;:if ($v != &amp;apos;hallo welt&amp;apos;) return $this-&amp;gt;errorMessage = &amp;apos;Irgend ein Fehler&amp;apos;;break;default: //also case &amp;apos;en&amp;apos;if ($v != &amp;apos;hello world&amp;apos;) return $this-&amp;gt;errorMessage = &amp;apos;Some Error&amp;apos;;}return TRUE;&amp;quot;;</description><shortdescription>all the given validating rules may not be enough for you. you need something handmade.</shortdescription></doc></variable><variable name="$trim" access="private" type="string"><doc><description>one of the php functions trim(), ltrim() and rtrim() is used, and so thefollowing chars are considered white spaces: &amp;quot;\n&amp;quot;, &amp;quot;\r&amp;quot;, &amp;quot;\t&amp;quot;, &amp;quot;\v&amp;quot;, &amp;quot;\0&amp;quot;,and a plain space.the value can be one of [none|left|right|both]note: setting is ignored for the types select and radio and checkbox.</description><shortdescription>trims white spaces from the user input.</shortdescription></doc></variable><variable name="$remove" access="private" type="array"><doc><see type="var">$removeI</see><description>examples:$remove = array(&amp;apos;abc&amp;apos;);$remove = array(&amp;apos;abc&amp;apos;, &amp;apos;abc&amp;apos;);$remove = array(&amp;apos;en&amp;apos;=&amp;gt;array(&amp;apos;abc&amp;apos;), &amp;apos;de&amp;apos;=&amp;gt;array(&amp;apos;abc&amp;apos;), &amp;apos;fr&amp;apos;=&amp;gt;array(&amp;apos;abc&amp;apos;));$remove = array(&amp;apos;en&amp;apos;=&amp;gt;array(&amp;apos;abc&amp;apos;,&amp;apos;abc&amp;apos;), &amp;apos;de&amp;apos;=&amp;gt;&amp;apos;abc&amp;apos;, &amp;apos;fr&amp;apos;=&amp;gt;array(&amp;apos;abc&amp;apos;,&amp;apos;abc&amp;apos;));these structures are not allowed because they would make it hard to guess what is meant:$remove = &amp;apos;abc&amp;apos;;$remove = array(&amp;apos;en&amp;apos;=&amp;gt;&amp;apos;abc&amp;apos;, &amp;apos;de&amp;apos;=&amp;gt;&amp;apos;abc&amp;apos;, &amp;apos;fr&amp;apos;=&amp;gt;&amp;apos;abc&amp;apos;);so the datatype is a vector or a hash holding vectors.note: setting is ignored for the types select and radio and checkbox.</description><shortdescription>remove string(s) from the user submitted value. language dependant. case sensitive.</shortdescription></doc></variable><variable name="$removeI" access="private" type="array"><doc><see type="var">$remove</see><description/><shortdescription>same as $remove, but case insensitive.</shortdescription></doc></variable><variable name="$replace" access="private" type="array"><doc><description>examples:$replace = array(&amp;apos;ä&amp;apos;=&amp;gt;&amp;apos;ae&amp;apos;, &amp;apos;hello&amp;apos;=&amp;gt;&amp;apos;hi&amp;apos;);$replace = array(&amp;apos;fr&amp;apos;=&amp;gt;array(&amp;apos;é&amp;apos;=&amp;gt;&amp;apos;e&amp;apos;), &amp;apos;de&amp;apos;=&amp;gt;array(&amp;apos;ä&amp;apos;=&amp;gt;&amp;apos;ae&amp;apos;,&amp;apos;ö&amp;apos;=&amp;gt;&amp;apos;oe&amp;apos;,&amp;apos;ü&amp;apos;=&amp;gt;&amp;apos;ue&amp;apos;);note: setting is ignored for the types select and radio and checkbox.</description><shortdescription>replaces strings with strings in the user submitted value. language dependant. case sensitive.</shortdescription></doc></variable><variable name="$replaceI" access="private" type="array"><doc><see type="var">$replace</see><description/><shortdescription>same as $replace, but case insensitive.</shortdescription></doc></variable><variable name="$case" access="private" type="string"><doc><description>- lower      make a string all lowercase.eg &amp;apos;Hello World&amp;apos; =&amp;gt; &amp;apos;hello world&amp;apos;- upper      make a string all uppercase.eg &amp;apos;Hello World&amp;apos; =&amp;gt; &amp;apos;HELLO WORLD&amp;apos;- ucwords    make the first character of words upper case (if it&amp;apos;s a letter).eg &amp;apos;hello world&amp;apos; =&amp;gt; &amp;apos;Hello World&amp;apos;- ucfirst    make the first character of the string upper case (if it&amp;apos;s a letter)eg &amp;apos;hello world&amp;apos; =&amp;gt; &amp;apos;Hello world&amp;apos;- nospam1    change strings to ucfirst if they are all upper case. replace any number of ! and ?signs with just one.eg &amp;apos;HELLO! CLICK HERE FOR SEX PICTURES!!!&amp;apos; =&amp;gt; &amp;apos;Hello! click here for sex pictures!!!&amp;apos;- nospam2    nospam1 + replace any number of ! signs with just one dot &amp;apos;.&amp;apos;.eg &amp;apos;HELLO! CLICK HERE FOR SEX PICTURES!!!&amp;apos; =&amp;gt; &amp;apos;Hello click here for sex pictures&amp;apos;note: setting is ignored for the types select and radio and checkbox.</description><shortdescription>modify the case of the user input? one of:</shortdescription></doc></variable><variable name="$codePostReceive" access="private" type="string"><doc><see type="var">$this</see><see type="var">$codePostLoad</see><description>and the other modification methods (case, replace, remove ...) have beendone already. also the vars valueDisplay and valueInternal have been assigned.but the validation things come later.the code is executed in $this-&amp;gt;evalWrap() (so you can use $this-&amp;gt; stuff).</description><shortdescription>this code is evaluated after the content has been received from the client</shortdescription></doc></variable><variable name="$codePostLoad" access="private" type="string"><doc><see type="var">$this</see><see type="var">$codePostReceive</see><description>the code is executed in a method of this class. (so you can use $this-&amp;gt;stuff)</description><shortdescription>this code is evaluated after it is unpersisted.</shortdescription></doc></variable><variable name="$this" access="private" type="unknown"><doc><overriden src="Bs_FormElement"/></doc></variable><variable name="$charsRule" access="private" type="unknown"><doc></doc></variable><constant name="BS_FORMFIELD_VERSION" undoc="true" access="private" case="default: case sensitive">4.0.$x$<doc></doc></constant><constant name="BS_FF_ERROR" undoc="true" access="private" case="default: case sensitive">1<doc></doc></constant><inherited src="Bs_FormElement" type="functions"><element>bs_formelement</element><element>hasformobject</element><element>setformobject</element><element>getelement</element><element>getlevel</element><element>_doelementstringformat</element><element>_getparamvalue</element><element>getlanguagedependentvalue</element></inherited><inherited src="Bs_Object" type="functions"><element>isex</element><element>isexception</element><element>tostring</element><element>tohtml</element><element>persist</element><element>unpersist</element><element>bs_object</element><element>bbsetoutput</element><element>bbawake</element><element>bbisawake</element><element>bbxmsg</element><element>bbxfunctionstart</element><element>bbxfunctionend</element><element>bbxecho</element><element>bbxvar</element><element>bbxvardump</element><element>bbforcetrace</element><element>bbbufferstart</element><element>bbbufferget</element><element>bbbufferendflush</element><element>bbbufferendclean</element></inherited><inherited src="Bs_FormElement" type="variables"><element>$persister</element><element>$persisterid</element><element>$_form</element><element>$name</element><element>$elementtype</element><element>$formid</element><element>$container</element><element>$orderid</element><element>$elementstringformat</element><element>$persistervarsettings</element></inherited><inherited src="Bs_FormElement" type="consts"><element>bs_formelement_version</element></inherited><inherited src="Bs_Object" type="consts"><element>bs_object_version</element></inherited><path><parent>Bs_FormElement</parent><parent>Bs_Object</parent></path><baseclass>Bs_Object</baseclass><subclasses><subclass>Bs_FormFieldBtn</subclass><subclass>Bs_FormFieldCheckbox</subclass><subclass>Bs_FormFieldTxt</subclass><subclass>Bs_FormFieldHidden</subclass><subclass>Bs_FormFieldImage</subclass><subclass>Bs_FormFieldRadio</subclass><subclass>Bs_FormFieldSelect</subclass><subclass>Bs_FormFieldTextarea</subclass><subclass>Bs_FormFieldSpreadsheet</subclass><subclass>Bs_FormFieldWysiwyg</subclass></subclasses></class></phpdoc>