From e05e1573411a7f6bc71735d961400db0bbc34c19 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 22 Jan 2016 13:55:24 -0800 Subject: [PATCH] Fix for tabs with numeric keys. --- e107_handlers/form_handler.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 9e6ee8f97..432b1d44a 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -216,15 +216,18 @@ class e_form $c = 0; foreach($array as $key=>$tab) { - if($c == 0 & $initTab == false) - { - $initTab = $key; - } if(is_numeric($key)) { $key = 'tab-'.$this->name2id($tab['caption']); } + + if($c == 0 & $initTab == false) + { + $initTab = $key; + } + + $active = ($key ==$initTab) ? ' class="active"' : ''; $text .= ''.$tab['caption'].'';