Documentation

GetPublicFilterHTML

string
CIBlockProperty*::GetPublicFilterHTML(
 arProperty,
 strHTMLControlName
);

Prints property filter html on public page for the iblock element list. Static method.

Call parameters

Parameter Description
arProperty
Property metadata. See Iblock element properties
strHTMLControlNameNames of controls used to specify property value and its description. Array type as follows:
array( 
    "VALUE" => html //secure name for the value, 
    "DESCRIPTION" => html //secure name for description, 
    "MODE" => //can accept the "FORM_FILL" value when calling from element edit form 
              //or "iblock_element_admin" when editing in the view mode for element list, 
              //as well as "EDIT_FORM" when editing iblock. 
    "FORM_NAME" => // form name that will have the in-built controls. 
    );

Returned value

Returned value - html code.

Examples

function GetPublicFilterHTML($arProperty, $strHTMLControlName)
   {
      $from_name = $strHTMLControlName["VALUE"].'_from';
      $to_name = $strHTMLControlName["VALUE"].'_to';
      $from = isset($_REQUEST[$from_name])? $_REQUEST[$from_name]: "";
      $to = isset($_REQUEST[$to_name])? $_REQUEST[$to_name]: "";

      return '
         <input name="'.htmlspecialcharsbx($from_name).'" value="'.htmlspecialcharsbx($from).'" size="8" type="text"> ...
         <input name="'.htmlspecialcharsbx($to_name).'" value="'.htmlspecialcharsbx($to).'" size="8" type="text">
      ';
   }

© «Bitrix24», 2001-2022
Up