Documentation

GetSettingsHTML

string
CIBlockProperty*::GetSettingsHTML(
array arProperty,
array strHTMLControlName,
array &arPropertyFields
);

The method returns safe HTML to show settings for iblock edit form. Method is static when using standard properties. Must be static for properties, created by client when using php7.

Note: the method is called when creating iblock edit form.

Call parameters

Parameter Description
arProperty Property metadata. See Structure for Iblock Module Tables
strHTMLControlNameName of control element for filling-in property settings. Array type:
array(
"NAME" => html safe name for settings,
);
arPropertyFieldsEmpty array.

Returned value

HTML for embedding into the iblock edit form.

Additional flags used to configure the form can be returned in the parameter arPropertyFields:
  • HIDE - array of names for property fields to be hidden for editing. Possible values: MULTIPLE, SEARCHABLE, FILTRABLE, WITH_DESCRIPTION, MULTIPLE_CNT, ROW_COUNT, COL_COUNT and DEFAULT_VALUE.
  • SHOW - array of fields to be displayed even if the basic property does not support them. Possible values: MULTIPLE, SEARCHABLE, FILTRABLE, WITH_DESCRIPTION, MULTIPLE_CNT, ROW_COUNT and COL_COUNT.
  • SET - associative array of fields for mandatory assigning of values in case when they are not displayed in the form. Possible values: MULTIPLE, SEARCHABLE, FILTRABLE, WITH_DESCRIPTION, MULTIPLE_CNT, ROW_COUNT and COL_COUNT.
  • USER_TYPE_SETTINGS_TITLE - string to display as a settings section title.

See Also

Exmple

<?
class CIBlockPropertyMyDateTime
{
function GetSettingsHTML($arProperty, $strHTMLControlName, &$arPropertyFields)
{
$arPropertyFields = array(
"HIDE" => array("FILTRABLE", "ROW_COUNT", "COL_COUNT", "DEFAULT_VALUE"), //will hide the field
"SET" => array("FILTRABLE" => "N"), //if set then hidden field will get this value
"USER_TYPE_SETTINGS_TITLE" => "Date/time settings"
);

return '<tr>
<td>Input field length:</td>
<td><input type="text" size="5" name="'.$strHTMLControlName["NAME"].'[WIDTH]"></td>
</tr>';
}
}
?>


© «Bitrix24», 2001-2024
Up