Hello community,
Is there a way to pre-populate a drop-down list of 'Tollallow' options, instead of the default free-form text field for Tollallow?
I was looking through the code in `extension_edit.php` and found the below piece of code. By the looks of it, it does look for an array type session variable 'toll allow' that will present the data into a drop-down list.
I couldn't find where this 'toll allow' session variable is being set. Anyone has any idea? or is this just legacy code that is not in use anymore.
Thanks
Is there a way to pre-populate a drop-down list of 'Tollallow' options, instead of the default free-form text field for Tollallow?
I was looking through the code in `extension_edit.php` and found the below piece of code. By the looks of it, it does look for an array type session variable 'toll allow' that will present the data into a drop-down list.
Code:
if (permission_exists('extension_toll')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-toll_allow']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
if (!empty($_SESSION['toll allow']['name']) && is_array($_SESSION['toll allow']['name'])) {
echo " <select class='formfld' name='toll_allow' id='toll_allow'>\n";
echo " <option value=''></option>\n";
foreach ($_SESSION['toll allow']['name'] as $name) {
if ($name == $toll_allow) {
echo " <option value='".escape($name)."' selected='selected'>".escape($name)."</option>\n";
}
else {
echo " <option value='".escape($name)."'>".escape($name)."</option>\n";
}
}
echo " </select>\n";
}
else {
echo " <input class='formfld' type='text' name='toll_allow' maxlength='255' value=\"".escape($toll_allow ?? '')."\">\n";
}
echo "<br />\n";
echo $text['description-toll_allow']."\n";
echo "</td>\n";
echo "</tr>\n";
}
I couldn't find where this 'toll allow' session variable is being set. Anyone has any idea? or is this just legacy code that is not in use anymore.
Thanks