[SOLVED] Placeholder value from dropdown list in PDF detail template

Status
Not open for further replies.

marcq

Member
Hi,

I have got a problem with a placeholder ({gprh_fabrik_user_enrollment___civilite}) in my PDF template which is returning the value (1,2,3) instead of Mme, Mlle or Mme by printing.

The concerned element is a dropdown Element.

I have tested with {gprh_fabrik_user_enrollment___civilite_raw} and {gprh_fabrik_user_enrollment___civilite} and I always get the value returned.


Code:
// No direct access
defined('_JEXEC') or die('Restricted access');


$form = $this->form;
$model = $this->getModel();

echo '<div class="fabrikForm fabrikDetails" id="' . $form->formid . '">';
echo $this->plugintop;
echo $this->loadTemplate('buttons');
echo $this->loadTemplate('relateddata');
?>
<head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"></head>
<div id="container">
<div id="content">
<table style="font-family: arial, helvetica, sans-serif; font-size: 11pt; width:100%;">
<tbody>
    <tr>
        <td width="55%" colspan="2"><img class="pull-left" src="http://www.webamazingapps.com/projects/gprh.ch/images/GPRH/GPRHformation.jpg" alt="" width="188" height="76" /></td>
        <td width="45%"></td>
    </tr>
    <tr>
        <td width="55%" colspan="2"></td>
        <td width="45%">
        <div>&nbsp;</div>
        <div>&nbsp;</div>
        <div>&nbsp;</div>
            <div>{gprh_fabrik_user_enrollment___civilite_raw}&nbsp;{gprh_fabrik_user_enrollment___nom}&nbsp;{gprh_fabrik_user_enrollment___prenom}</div>
            <div>{gprh_fabrik_user_enrollment___rue_numero}</div>
            <div></div>
            <div>{gprh_fabrik_user_enrollment___np}&nbsp;{gprh_fabrik_user_enrollment___localite}</div>
        </td>
    </tr>
</tbody>
</table>

Could it be because I have in my Suboption ? "0" value ? :

upload_2016-1-17_13-43-36.png

Thanks in advance for your support,

Cheers,

Marc

PS: this thread follows the following closed thread : http://fabrikar.com/forums/index.ph...df-library-to-generate-pdf-query-issue.42962/
 
Last edited:
Dont' use placeholders, try
<?php echo $this->groups['your-group']->elements['civilite_ro']; ?>
 
Dont' use placeholders, try
<?php echo $this->groups['your-group']->elements['civilite_ro']; ?>

Hi troester, thank you for your reply. I tried with the group147 (id 147), but it doesn't work :

Code:
<?php echo $this->groups['group147']->elements['civilite_ro'];?>

Notice: Undefined index: civilite_ro in /homepages/38/d566226193/htdocs/projects/gprh.ch/components/com_fabrik/views/details/tmpl/bootstrap_printinvoice/default.php on line 55

and with the group name
Code:
<?php echo $this->groups['Choix de la formation - Inscription accept?e']->elements['civilite_ro'];?>

Notice: Undefined index: civilite_ro in /homepages/38/d566226193/htdocs/projects/gprh.ch/components/com_fabrik/views/details/tmpl/bootstrap_printinvoice/default.php on line 55
 
Last edited:
Solution is :

Code:
<?php echo $this->groups['Inscription formation - Inscription accept?e']->elements['civilite']->element_ro;?>

Thanks troester
 
Last edited:
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top