Bitrix Site Manager

CExtra::SelectBox

string
CExtra::SelectBox(
 string sFieldName, 
 string sValue, 
 string sDefaultValue = "", 
 string JavaChangeFunc = "", 
 string sAdditionalParams = ""
);

The method SelectBox returns the HTML code that can be used to display the drop-down list of discounts. The results of the method calls are cached; this means that subsequent calls within one page do not incur numerous requests to the database.

Parameters

ParameterDescription
sFieldName Value of the NAME attribute of the SELECT tag used for the drop-down list of discounts.
sValue Initial value.
sDefaultValue Name of the special value describing the void discount (e.g. All or No).
JavaChangeFunc Name of the JavaScript function handler of the OnChange event of the list. If empty, the OnChange event is not handled.
sAdditionalParams Additional attributes to be included in the SELECT tag.

Return Values

Returns the string with the HTML code of the list.

Example



<?
echo CExtra::SelectBox("CAT_EXTRA",
                       2,
                       "No",
                       "ChangeExtra()",
                       "class='typeselect'");
?>