Answer the question
In order to leave comments, you need to log in
How to remake the delete fields function so that all but one field would be deleted?
There is a function that removes the fields for the filter.
function deleteFilter(el)
{
BX.adminPanel.showWait(el);
if (0 < arClearHiddenFields.length)
{
for (var index = 0; index < arClearHiddenFields.length; index++)
{
if (undefined != window[arClearHiddenFields[index]])
{
if ('ClearForm' in window[arClearHiddenFields[index]])
{
window[arClearHiddenFields[index]].ClearForm();
}
}
}
}
<?=$sTableID."_filter"?>.OnClear('<?=CUtil::JSEscape($sTableID)?>', '<?=CUtil::JSEscape($APPLICATION->GetCurPage().'?type='.urlencode($type).'&IBLOCK_ID='.$IBLOCK_ID.'&lang='.LANGUAGE_ID.'&')?>');
return false;
function deleteFilter(el)
{
BX.adminPanel.showWait(el);
if (0 < arClearHiddenFields.length)
{
for (var index = 0; index < arClearHiddenFields.length; index++)
{
if (undefined != window[arClearHiddenFields[index]])
{
if ('IBLIST_A_F_CREATED_BY' == arClearHiddenFields[index]) {
continue;
}
if ('ClearForm' in window[arClearHiddenFields[index]])
{
window[arClearHiddenFields[index]].ClearForm();
}
}
}
}
<?=$sTableID."_filter"?>.OnClear('<?=CUtil::JSEscape($sTableID)?>', '<?=CUtil::JSEscape($APPLICATION->GetCurPage().'?type='.urlencode($type).'&IBLOCK_ID='.$IBLOCK_ID.'&lang='.LANGUAGE_ID.'&')?>');
return false;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question