<?php foreach($fields_abas as $abas) {if($abas[0] != 'hidden'){ ?>
					<div class="panel panel-default">
						<div class="panel-heading"><h3 class="panel-title"><?php echo $abas[0]?></h3></div>
						<div class="panel-body">
							<?php foreach($fields as $field) { 	if (in_array($field->field_name, $abas[1])) {  ?>
						    	
						    	<div class="form-group <?php echo $field->field_name; ?>_form_group">
                                    <label class="col-sm-2 control-label">
                                        <?php echo $input_fields[$field->field_name]->display_as; ?><?php echo ($input_fields[$field->field_name]->required) ? "<span class='required'>*</span> " : ""; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <?php echo $input_fields[$field->field_name]->input?>
                                    </div>
                                </div>
                                
                        	<?php }}?>
                        </div>
					</div>
<?php }else{ ?>

    <?php foreach($fields as $field) { 	if (in_array($field->field_name, $abas[1])) {  ?>
						    	
    	<div class="form-group <?php echo $field->field_name; ?>_form_group">
            <label class="col-sm-2 control-label">
                <?php echo $input_fields[$field->field_name]->display_as; ?><?php echo ($input_fields[$field->field_name]->required) ? "<span class='required'>*</span> " : ""; ?>
            </label>
            <div class="col-sm-9">
                <?php echo $input_fields[$field->field_name]->input?>
            </div>
        </div>
        
	<?php }}?>
	
<?php }} ?>