How render element in form view

Hi,

I am using below code in default.php

<?php if(trim($group->title) == 'Workforce') {?>
<?php
if ($group->intro !== '') :?>
<div class="groupintro"><?php echo $group->intro ?></div>
<?php
endif;
$this->elements = $group->elements;
echo $this->loadTemplate('workforce');

if (!empty($group->outro)) : ?>
<div class="groupoutro"><?php echo $group->outro ?></div>
<?php
endif;
?>
<?php } else {?>
<?php
if ($group->intro !== '') :?>
<div class="groupintro"><?php echo $group->intro ?></div>
<?php
endif;

$this->elements = $group->elements;
echo $this->loadTemplate($group->tmpl);

if (!empty($group->outro)) : ?>
<div class="groupoutro"><?php echo $group->outro ?></div>
<?php
endif;
?>
<?php }?>

and this code in default_workforce.php
<table>
<tbody>
<tr>
<?php $this->element =&$this->elements['Name']; ?>
<td width="152" class="tg-031e"><?php echo $this->element->label; ?></td>
<?php $this->element =&$this->elements['Photo']; ?>
<td class="tg-yw4l" colspan="3"><?php echo $this->element->element ?></td>
<td width="161" colspan="1" rowspan="9" class="tg-photo"><?php echo $this->element->element ?></td>
</tr>
<tr>
<?php $this->element =&$this->elements['Father_Husband_Name']; ?>
<td class="tg-031e"><?php echo $this->element->label; ?></td>
<td class="tg-yw4l" colspan="3"><?php echo $this->element->element ?></td>
</tr>
<tr>
<?php $this->element =&$this->elements['Sex']; ?>
<td class="tg-031e"><?php echo $this->element->label; ?></td>
<td width="304" class="tg-yw4l"><?php echo $this->element->element ?></td>
<?php $this->element =&$this->elements['DOB']; ?>
<td width="141" class="tg-yw4l"><?php echo $this->element->label; ?></td>
<td width="150" class="tg-031e"><?php echo $this->element->element ?></td>

</tr>
<tr>
<?php $this->element =&$this->elements['Email']; ?>
<td class="tg-031e"><?php echo $this->element->label; ?></td>
<td class="tg-yw4l"><?php echo $this->element->element ?></td>
<?php $this->element =&$this->elements['Mobile']; ?>
<td class="tg-yw4l"><?php echo $this->element->label; ?></td>
<td class="tg-031e"><?php echo $this->element->element ?></td>
</tr>
</tbody
</table>

-------------------------------------------------------------------------------------

Though it renders all the elements, but when I try to update any element value for e.g. Name .. it won't take the changes even after displaying the note "Record Added / Updated.

Please any suggestion.. thanks
 
I don't think help with custom coding is covered by free community support.

BTW: there's an icon to include code into a post
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top