xycofryx
Member
Joomla 3.8.11 Fabrik 3.8.1
How do I insert the signature of the user in a modified details view with only the user_id:
e.g. I have a table users with the field digsig and another table named permit with a field called sinature of approval, I was thinking that:
will work but then again, I was thinking of
Is there any method easier than this one?
Thanks
How do I insert the signature of the user in a modified details view with only the user_id:
e.g. I have a table users with the field digsig and another table named permit with a field called sinature of approval, I was thinking that:
Code:
$signature = $this->groups['Users']->elements['signature'];
Code:
$approver= $this->groups['Permit']->elements['approver'];
$approver_id = $approver->element_raw;
$db_approver = JFactory::getDbo();
$query_approver = $db_approver->getQuery(true);
$query_approver->select(array('user_id','signature'));
$query_approver->from($db_approver->quoteName('users_system'));
$query_approver->where($db_approver->quoteName('user_id')." = ".$db_approver->quote($approver_id));
$db_approver->setQuery($query_approver);
$signature= $db_approver->loadAssoc();
<div class="signature">
<div class="fabrikElementReadOnly" >
<div id="permitting_ltp___signature_ro_sig" class="oc_sigPad signed">
<div class="sigWrapper" style="height:150px;">
<canvas class="pad" width="383" height="193" pf-dataurl-index="0">
<?php echo strip_tags(trim($signature['signature']));?>
</canvas>
</div>
</div>
</div>
</div>
Thanks