<?xml version="1.0"?><phpdoc><class name="Bs_FormFieldSelect" extends="Bs_FormField" undoc="false" access="public" package="Form"><file>C:/usr/local/lib/php/blueshoes-4.2/core/html/form/Bs_FormFieldSelect.class.php</file><doc><author email="andrej@arn.li">andrej arn</author><inherited src="Array"/><overriden src="Array"/><description>example tag:&amp;lt;select name=&amp;quot;fieldname&amp;quot; size=&amp;quot;5&amp;quot; multiple&amp;gt;&amp;lt;option value=&amp;quot;1&amp;quot; SELECTED&amp;gt;one&amp;lt;/option&amp;gt;&amp;lt;option value=&amp;quot;2&amp;quot; SELECTED&amp;gt;two&amp;lt;/option&amp;gt;&amp;lt;option value=&amp;quot;3&amp;quot;&amp;gt;three&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;what&amp;apos;s special about this tag?alot is different to a text field for example.- value     =&amp;gt; the real value can be different from the visible value.- value     =&amp;gt; multiple values can be selected.- size      =&amp;gt; how large the select field should be displayed. needs to be &amp;gt;1 for multiple.- multiple  =&amp;gt; if more then one value can be selected. size needs to be set and &amp;gt;1.- events    =&amp;gt; does not support the usual 14 events, only &amp;apos;onBlur&amp;apos;, &amp;apos;onFocus&amp;apos; and &amp;apos;onChange&amp;apos;(2001/05/01)- all the following object vars are of no use and thus ignored (mainly because the usercannot change the values at all, he can only select them):- bsDataType         - mustContain- bsDataInfo         - notContain- minLength          - mustBeUnique- [maxLength]        - regularExpression- mustStartWith      - trim- notStartWith       - remove- mustEndWith        - replace- notEndWith         - case- optionsthe options that are selectable for the user.- valueDefaultthe following data structores are allowed:array(&amp;apos;1&amp;apos;=&amp;gt;&amp;apos;one&amp;apos;, &amp;apos;2&amp;apos;=&amp;gt;&amp;apos;two&amp;apos;, &amp;apos;3&amp;apos;=&amp;gt;&amp;apos;three&amp;apos;);array(&amp;apos;en&amp;apos;=&amp;gt;array(&amp;apos;1&amp;apos;=&amp;gt;&amp;apos;one&amp;apos;,&amp;apos;2&amp;apos;=&amp;gt;&amp;apos;two&amp;apos;,&amp;apos;3&amp;apos;=&amp;gt;&amp;apos;three&amp;apos;), &amp;apos;de&amp;apos;=&amp;gt;array(&amp;apos;1&amp;apos;=&amp;gt;&amp;apos;eins&amp;apos;,&amp;apos;2&amp;apos;=&amp;gt;&amp;apos;zwei&amp;apos;,&amp;apos;3&amp;apos;=&amp;gt;&amp;apos;drei&amp;apos;), &amp;apos;fr&amp;apos;=&amp;gt;array(&amp;apos;1&amp;apos;=&amp;gt;&amp;apos;un&amp;apos;,&amp;apos;2&amp;apos;=&amp;gt;&amp;apos;deux&amp;apos;,&amp;apos;3&amp;apos;=&amp;gt;&amp;apos;trois&amp;apos;));while these are not:&amp;apos;one&amp;apos;;array(&amp;apos;one&amp;apos;, &amp;apos;two&amp;apos;, &amp;apos;three&amp;apos;);array(&amp;apos;en&amp;apos;=&amp;gt;&amp;apos;one&amp;apos;, &amp;apos;de&amp;apos;=&amp;gt;&amp;apos;eins&amp;apos;, &amp;apos;fr&amp;apos;=&amp;gt;&amp;apos;un&amp;apos;);array(&amp;apos;en&amp;apos;=&amp;gt;array(&amp;apos;one&amp;apos;,&amp;apos;two&amp;apos;,&amp;apos;three&amp;apos;), &amp;apos;de&amp;apos;=&amp;gt;array(&amp;apos;eins&amp;apos;,&amp;apos;zwei&amp;apos;,&amp;apos;drei&amp;apos;), &amp;apos;fr&amp;apos;=&amp;gt;array(&amp;apos;un&amp;apos;,&amp;apos;deux&amp;apos;,&amp;apos;trois&amp;apos;));because it would not be possible to know the difference sometimes.this means: even if you have only one default value, it must be an array. and you alwaysneed key=&amp;gt;val, even if the key and the value is the same.no dependencies here.</description><shortdescription>SELECT Form Field Class</shortdescription><version>4.0.$id$</version><copyright>blueshoes.org</copyright></doc><function name="Bs_FormFieldSelect" undoc="false" access="public"><doc><return type="void"/><description/><shortdescription>Constructor.</shortdescription></doc></function><function name="&amp;getField" undoc="false" access="public"><doc><parameter name="$addEnforceCheckbox" default="TRUE" type="string">default is TRUE. adds the enforce checkbox automatically, if needed. see (parent::)addEnforceCheckbox().</parameter><return name="" type="string">some html code</return><description>overwrites parent method.</description><shortdescription>Returns some html code to display the field on a website in a form.</shortdescription></doc></function><function name="_getOptionsString" undoc="false" access="private"><doc><return name="" type="string"/><description/><shortdescription>returns a string with the option tags to send to the client.</shortdescription></doc></function><function name="_prepareOptionsData" undoc="false" access="private"><doc><return name="" type="array"/><description>big note: this method is (and should be) identical in Bs_FormFieldRadio and Bs_FormFieldSelect.</description><shortdescription>prepares the options to select from for this field.</shortdescription></doc></function><function name="getOptionStringForValue" undoc="false" access="public"><doc><parameter name="$value" type="mixed">(string or so)</parameter><parameter name="$lang" default="null" type="string">(...)</parameter><return name="" type="string"/><description>example:you have &amp;lt;option value=&amp;quot;ca&amp;quot;&amp;gt;Canada&amp;lt;/option&amp;gt;getOptionStringForValue(&amp;apos;ca&amp;apos;) returns &amp;apos;Canada&amp;apos;.big note: this method is (and should be) identical in Bs_FormFieldRadio and Bs_FormFieldSelect.</description><shortdescription>returns the displayed value for an internal value.</shortdescription></doc></function><function name="_getDefaultValue" undoc="false" access="private"><doc><return name="" type="string">i think, maybe an array is possible too.)</return><description>outsourced this from _getOptionsString().</description><shortdescription>returns the default value somehow. depends on form-&amp;gt;step.</shortdescription></doc></function><function name="inputManipulate" undoc="true" access="public"><doc><return type="void"/><overriden src="Bs_FormField"/><description/><shortdescription>overwrite parent method cause we don&amp;apos;t want to manipulate anything here.</shortdescription></doc></function><function name="inputValidate" undoc="true" access="public"><doc><parameter name="$paramValue" default="NULL" type="mixed">(only used internally!!!)</parameter><return name="" type="mixed"/><overriden src="Bs_FormField"/><description>overwrites parent method. read manual there. additional information:the order for data validation is: (-- means check omitted here)1) must         5) --mustStartWith     9) --mustContain    13) --mustBeUnique2a) onlyOneOf   6) --notStartWith     10) --notContain     14) --regularExpression2b) onlyIf3) minLength    7) --mustEndWith      11) --equalTo4) maxLength    8) --notEndWith       12) --notEqualTo</description><shortdescription>validate the user inputs according to the object vars.</shortdescription></doc></function><function name="validateMinLength" undoc="true" 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><return name="" type="mixed"> (bool)TRUE if ok, (string)error message if not.</return><overriden src="Bs_FormField"/><description>overwrites parent method. for a select field the minLength has another meaning.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>checks the minLength case.</shortdescription></doc></function><function name="validateMaxLength" undoc="true" 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><overriden src="Bs_FormField"/><description>overwrites parent method. for a select field the maxLength has another meaning.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>checks the maxLength case.</shortdescription></doc></function><function name="_prepareOptions" undoc="false" access="private"><doc><see type="var">$optionsType</see><see type="var">$optionsHard</see><see type="var">$optionsEval</see><see type="var">$_options</see><parameter name="$suppressErrors" default="FALSE" type="string">(default is FALSE. it&amp;apos;s really hard to debug something with this set to true. you won&amp;apos;t see anything.)</parameter><return type="void"/><description/><shortdescription>sets $this-&amp;gt;_options based on the vars $optionsHard and $optionsEval.</shortdescription></doc></function><variable name="$size" access="private" type="int"><doc><description>if not set it won&amp;apos;t be written to the client, which equals to a value of &amp;apos;1&amp;apos;.</description><shortdescription>how large the select field should be displayed. needs to be &amp;gt;1 for multiple.</shortdescription></doc></variable><variable name="$multiple" access="private" type="bool"><doc><description>$size needs to be &amp;gt;1 then. if not set it&amp;apos;s FALSE.</description><shortdescription>if the user is able to select multiple values, not just one.</shortdescription></doc></variable><variable name="$optionsType" access="private" type="string"><doc><see type="function">_prepareOptions()</see><see type="var">$optionsHard</see><see type="var">$optionsEval</see><see type="var">$_options</see><description>one of &amp;apos;eval&amp;apos; or &amp;apos;hard&amp;apos;.if not set, the one var that is used is used :) if both are used(speaking of $optionsHard and $optionsEval) then $optionsHard isthe default.</description><shortdescription>how to fill in the option tags for this select field.</shortdescription></doc></variable><variable name="$_options" access="private" type="array"><doc><see type="function">_prepareOptions()</see><see type="var">$optionsType</see><see type="var">$optionsHard</see><see type="var">$optionsEval</see><description/><shortdescription>made up in _prepareOptions() using $optionsHard and $optionsEval.</shortdescription></doc></variable><variable name="$optionsHard" access="private" type="array"><doc><see type="function">_prepareOptions()</see><see type="var">$optionsType</see><see type="var">$optionsEval</see><see type="var">$_options</see><description>the following data structures are allowed:array(&amp;apos;1&amp;apos;=&amp;gt;&amp;apos;one&amp;apos;, &amp;apos;2&amp;apos;=&amp;gt;&amp;apos;two&amp;apos;, &amp;apos;4&amp;apos;=&amp;gt;&amp;apos;four&amp;apos;);array(&amp;apos;en&amp;apos;=&amp;gt;array(&amp;apos;1&amp;apos;=&amp;gt;&amp;apos;one&amp;apos;,&amp;apos;2&amp;apos;=&amp;gt;&amp;apos;two&amp;apos;,&amp;apos;3&amp;apos;=&amp;gt;&amp;apos;three&amp;apos;), &amp;apos;de&amp;apos;=&amp;gt;array(&amp;apos;1&amp;apos;=&amp;gt;&amp;apos;eins&amp;apos;,&amp;apos;2&amp;apos;=&amp;gt;&amp;apos;zwei&amp;apos;,&amp;apos;3&amp;apos;=&amp;gt;&amp;apos;drei&amp;apos;), &amp;apos;fr&amp;apos;=&amp;gt;array(&amp;apos;1&amp;apos;=&amp;gt;&amp;apos;un&amp;apos;,&amp;apos;2&amp;apos;=&amp;gt;&amp;apos;deux&amp;apos;,&amp;apos;3&amp;apos;=&amp;gt;&amp;apos;trois&amp;apos;));while these are not:&amp;apos;one&amp;apos;;array(&amp;apos;one&amp;apos;, &amp;apos;two&amp;apos;, &amp;apos;three&amp;apos;);array(&amp;apos;en&amp;apos;=&amp;gt;&amp;apos;one&amp;apos;, &amp;apos;de&amp;apos;=&amp;gt;&amp;apos;eins&amp;apos;, &amp;apos;fr&amp;apos;=&amp;gt;&amp;apos;un&amp;apos;);array(&amp;apos;en&amp;apos;=&amp;gt;array(&amp;apos;one&amp;apos;,&amp;apos;two&amp;apos;,&amp;apos;three&amp;apos;), &amp;apos;de&amp;apos;=&amp;gt;array(&amp;apos;eins&amp;apos;,&amp;apos;zwei&amp;apos;,&amp;apos;drei&amp;apos;), &amp;apos;fr&amp;apos;=&amp;gt;array(&amp;apos;un&amp;apos;,&amp;apos;deux&amp;apos;,&amp;apos;trois&amp;apos;));because it would not be possible to know the difference sometimes.this means: even if you have only one default value, it must be an array. and you alwaysneed key=&amp;gt;val, even if the key and the value is the same.</description><shortdescription>the options that are selectable for the user.</shortdescription></doc></variable><variable name="$optionsEval" access="private" type="mixed"><doc><see type="function">_prepareOptions()</see><see type="var">$optionsType</see><see type="var">$optionsHard</see><see type="var">$_options</see><description>that will be used for the option tags of this select field.the code is executed in $this-&amp;gt;_prepareOptions() so it&amp;apos;s in thescope of a method of this object. this means you can use varsfrom here etc.language dependant. ya know what i mean.</description><shortdescription>php code to be evaluated. has to return an array (hash or vector)</shortdescription></doc></variable><variable name="$minLength" access="private" type="unknown"><doc><overriden src="Bs_FormField"/><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="unknown"><doc><see type="var">$this</see><overriden src="Bs_FormField"/><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><constant name="BS_FORMFIELDSELECT_VERSION" undoc="true" access="private" case="default: case sensitive">4.0.$x$<doc></doc></constant><inherited src="Bs_FormField" type="functions"><element>bs_formfield</element><element>&amp;getelement</element><element>getfield</element><element>addenforcecheckbox</element><element>isexplodable</element><element>getadvancedstyle</element><element>getadvancedstylehelper</element><element>setexplode</element><element>getlabel</element><element>validatemust</element><element>validateonlyoneof</element><element>validateonlyif</element><element>validatemuststartwith</element><element>validatenotstartwith</element><element>validatemustendwith</element><element>validatenotendwith</element><element>validatemustcontain</element><element>validatenotcontain</element><element>validateequalto</element><element>validatenotequalto</element><element>validatedatatype</element><element>validateregularexpression</element><element>validateadditionalcheck</element><element>validatemustbeunique</element><element>getvisibility</element><element>getonenterbehavior</element><element>getonentercode</element><element>applyonenterbehavior</element><element>shouldpersist</element><element>getdbdatatype</element><element>getdbfieldname</element><element>_getmaxlength</element><element>_gettagstringevents</element><element>getvalue</element><element>_gettagstringvalue</element><element>_gettagstringstyles</element><element>_gettagstringadditionaltags</element><element>getcaption</element><element>getcaptionforformoutput</element><element>geterror</element><element>gethelp</element><element>_highlightaccesskey</element><element>_getaccesskey</element><element>getfieldashidden</element><element>_getfieldnameforhtml</element><element>hasjavascript</element><element>ismust</element><element>_anyifcase</element><element>_markasused</element><element>_getbsdatainfonumber</element><element>isfilledin</element><element>_evalwrap</element><element>unpersisttrigger</element><element>geterrormessage</element><element>&amp;serialize</element><element>unserialize</element><element>&amp;encrypt</element><element>&amp;decrypt</element><element>initfrompost</element></inherited><inherited src="Bs_FormElement" type="functions"><element>bs_formelement</element><element>hasformobject</element><element>setformobject</element><element>getcaption</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_FormField" type="variables"><element>$_bs_string</element><element>$_bs_array</element><element>$_bs_htmlutil</element><element>$_bs_date</element><element>$fieldtype</element><element>$caption</element><element>$defaulterrormessage</element><element>$errormessage</element><element>$errortype</element><element>$level</element><element>$editability</element><element>$accessrights</element><element>$visibility</element><element>$isused</element><element>$valuedefault</element><element>$valuedefaulttype</element><element>$valuereceived</element><element>$valuedisplay</element><element>$valueinternal</element><element>$savetodb</element><element>$dbfieldname</element><element>$dbdatatype</element><element>$dbnotnull</element><element>$dbprimarykey</element><element>$dbkey</element><element>$dbindexfulltext</element><element>$dbautoincrement</element><element>$dbunique</element><element>$dbforeignkey</element><element>$dbattributes</element><element>$explodeeval</element><element>$_explodearray</element><element>$direction</element><element>$styles</element><element>$advancedstyles</element><element>$events</element><element>$onenter</element><element>$additionaltags</element><element>$bsdatatype</element><element>$bsdatainfo</element><element>$bsdatamanipulation</element><element>$bsdatamanipvar</element><element>$enforce</element><element>$_must</element><element>$must</element><element>$mustif</element><element>$mustoneof</element><element>$mustoneofif</element><element>$onlyoneof</element><element>$onlyif</element><element>$onlyoneofif</element><element>$muststartwith</element><element>$notstartwith</element><element>$mustendwith</element><element>$notendwith</element><element>$mustcontain</element><element>$notcontain</element><element>$equalto</element><element>$notequalto</element><element>$mustbeunique</element><element>$regularexpression</element><element>$additionalcheck</element><element>$trim</element><element>$remove</element><element>$removei</element><element>$replace</element><element>$replacei</element><element>$case</element><element>$codepostreceive</element><element>$codepostload</element><element>$this</element><element>$charsrule</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><element>$this</element></inherited><inherited src="Bs_FormField" type="consts"><element>bs_formfield_version</element><element>bs_ff_error</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_FormField</parent><parent>Bs_FormElement</parent><parent>Bs_Object</parent></path><baseclass>Bs_Object</baseclass><subclasses><subclass>Bs_FormFieldSelectImage</subclass><subclass>Bs_DaFormFieldComboBox</subclass><subclass>Bs_FormFieldChVisa</subclass><subclass>Bs_FormFieldCountryList</subclass></subclasses></class></phpdoc>