Documentation

GetExistFlagFilter

string
CForm::GetExistFlagFilter(
 int filter_sid,
 string add_to_checkbox = "class=\"inputcheckbox\""
)

Returns HTML code for filter field, intended for filtration of results by existing answer value to the web form [link= 6660053#question]question[/link] or by existing web form field value. Returned HTML code includes the flag of multiple selection (checkbox). Non-static method.

Note
Name of resulting HTML field will be generated by the following mask:
find_filter_sid

Method parameter

Parameter Description
filter_sid Filter field ID. Generated by the following template:
FSID_QSID_PTYPE_exist,
где:
  • FSID - symbolic identifier of web form;
  • QSID - symbolic identifier of web form question/field;
  • PTYPE - parameter type for filtration. The following values are possible:
    • ANSWER_TEXT - parameter ANSWER_TEXT of the web form question;
    • ANSWER_VALUE - parameter ANSWER_VALUE of the web form question;
    • USER - for the web form question - typed value for web form fields - this web form field value.
Examples:
  • FORM_USER_NAME_USER_text;
  • FORM_TEST_FIELD_USER_text.
add_to_checkbox Custom HTML to be added to the tag for the flag dropdown list:
<input type="checkbox" add_to_checkbox ...>

Optional parameter. By default - "class=\"inputcheckbox\"".

See Also

Examples of use

<form action="" method="POST">
<table>
    <tr>
        <td>Photo</td>
        <td><?
            echo CForm::GetExistFlagFilter(
                "FORM_PHOTO_USER_exist", 
                "class=\"inputcheckbox\""
                );
            ?></td>
    </tr>
</table>
<input type="submit" value="Filter">
</form>


© «Bitrix24», 2001-2024
Up