<?
$FORM_ID = 4; // The ID of the web form
// form the filter array
$arFilter = Array(
// question ID=140 or ID=141
"ID" => "140 | 141",
// we need the ID to match exactly
"ID_EXACT_MATCH" => "Y",
// symbolic identifier
"SID" => "VS_BIRTHDAY",
// match symbolic identifier exactly
"SID_EXACT_MATCH" => "Y",
// text of the question
"TITLE" => "Birthday",
// entry in text of the question is sufficient
"TITLE_EXACT_MATCH" => "N",
// active state flag
"ACTIVE" => "Y",
// we need questions which are in the HTML table of results
"IN_RESULTS_TABLE" => "Y",
// we need questions which are in the Excel table of results
"IN_EXCEL_TABLE" => "N",
// we need questions which are in the filter
"IN_FILTER" => "Y",
// questions requiring an answer
"REQUIRED" => "Y",
);
// obtain the list of all questions of the web form #4
$rsQuestions = CFormField::GetList(
$FORM_ID,
"N",
$by="s_id",
$order="desc",
$arFilter,
$is_filtered
);
while ($arQuestion = $rsQuestions->Fetch())
{
echo "<pre>"; print_r($arQuestion); echo "</pre>";
}
?>