Вдруг если кому-то понадобится решил это вопрос таким костылём. Код размещается на той же странице где и компонент form.result.new
if(
$_POST['form_dropdown_SIMPLE_QUESTION_321'] == 16 &&
$_POST['form_dropdown_SIMPLE_QUESTION_611'] != '' &&
$_POST['form_text_27'] != '' &&
$_POST['form_email_28'] != '' &&
$_POST['form_text_29'] != ''
) {
$thanks_page = 'http://www.site.com/1c-bitrix/thankyou_page_buy_license_site_management/';
} elseif(
$_POST['form_dropdown_SIMPLE_QUESTION_321'] == 17 &&
$_POST['form_dropdown_SIMPLE_QUESTION_611'] != '' &&
$_POST['form_text_27'] != '' &&
$_POST['form_email_28'] != '' &&
$_POST['form_text_29'] != ''
) {
$thanks_page = 'http://www.site.com/1c-bitrix/thankyou_page_buy_license_corporate_portal/';
} else {
$thanks_page = 'http://www.site.com/1c-bitrix/thanks_page/';
}
А в настройках компонента(в коде) в значение для SUCCES_URL пишем $thanks_page.
$APPLICATION->IncludeComponent(
"avanport:form.result.new",
"order",
Array(
"SEF_MODE" => "N",
"WEB_FORM_ID" => "3",
"LIST_URL" => "",
"EDIT_URL" => "",
"SUCCESS_URL" => $thanks_page,
"CHAIN_ITEM_TEXT" => "",
"CHAIN_ITEM_LINK" => "",
"IGNORE_CUSTOM_TEMPLATE" => "N",
"USE_EXTENDED_ERRORS" => "N",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "3600",
"CACHE_NOTES" => "",
"VARIABLE_ALIASES" => Array(
"WEB_FORM_ID" => "WEB_FORM_ID",
"RESULT_ID" => "RESULT_ID"
)
)
);
Или в визуальных настройках в поле саксес_урл пишем '={$thanks_page}'