akirasrebirth
New Member
Hello
I'm using two different templates in a form, one for data submit and one for view only.
The view only template displays only elements with data.
I would change the order of the elements in the view only form without changing the order in the submit form.
Also a would that the tooltip displays only in submit form and not in the view only form ... is that possible?
Sorry for bad English :'(
Thanks Roland
This is the view only template code
I'm using two different templates in a form, one for data submit and one for view only.
The view only template displays only elements with data.
I would change the order of the elements in the view only form without changing the order in the submit form.
Also a would that the tooltip displays only in submit form and not in the view only form ... is that possible?
Sorry for bad English :'(
Thanks Roland
This is the view only template code
Code:
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
?>
<?php echo $this->form->error;?>
<form class="fabrikForm" action="<?php echo $this->form->action;?>"
<?php echo $this->form->js;?> method="post"
name="<?php echo $this->form->name;?>"
enctype="<?php echo $this->form->encType;?>"><?php if($this->showEmail){
echo $this->emailLink;
}?> <?php if($this->showPDF){
echo $this->pdfLink;
}?> <?php if($this->showPrint){
echo $this->printLink;
}?>
<?php foreach( $this->groups as $group ){?>
<?php if($group->canRepeat){?>
<?php }?>
<div class="fb_group" id="group<?php echo $group->id;?>" style="<?php echo $group->css;?>">
<table>
<?php if($group->canRepeat){
$subgroupCounter = 0;
foreach($group->subgroups as $subgroup){
if($group->canRepeat && $this->task != 'viewTableRowDetails' ){?>
<div><a class="addGroup" href="#" id="<?php echo $group->addId;?>"><?php echo _ADD;?></a> | <a class="deleteGroup" href="#" id="<?php echo $group->delId;?>"><?php echo _DELETE;?></a></div>
<?php }?>
<div class="fb_sub_group" id="subgroup<?php echo $group->id . "_" . $subgroupCounter;?>">
<?php foreach( $subgroup as $element ){?>
<?php if($element->error != ''){?>
<tr class="fb_element" id="fb_element_<?php echo $element->int;?>">
<td colspan="2">
<div class="fabrikerror"><?php echo $element->error;?></div>
</td>
</tr>
<?php }?>
<tr class="fb_element">
<td><?php echo $element->label;?></td>
<td><?php echo $element->element;?></td>
</tr>
<?php }?>
</div>
<?php $subgroupCounter ++;
} ?>
<?php }else{?>
<?php foreach( $group->elements as $element ){?>
<?php if($element->error != ''){?>
<tr class="fb_element">
<td colspan="2">
<div class="fabrikerror"><?php echo $element->error;?></div>
</td>
</tr>
<?php }?>
<?php if ($element->value) { ?>
<tr class="fb_element" id="fb_element_<?php echo $element->int;?>">
<td><?php echo $element->label;?><td>
<td><?php echo $element->element;?></td>
</tr>
<?php }?>
<?php }
}?>
</table>
</div>
<?php }?>
<?php echo $this->hiddenFields;
echo $this->ask_receipt?>
<div class="fabrikActions"><?php echo $this->form->resetButton;?> <?php echo $this->form->submitButton;?>
</div>
</form>
<?php echo $this->jsActions; ?>