Placeholders dont work

nine007

Member
Good Day

I am using the latest from git and joomla 3.1.

The placeholders {tablename___elementname} or {___elementname} or like this <?php echo $this->data['dog_jobs___jobs_province']->element ?> does not work in any custom forms.

Any help on this.

thank you
 
I don't have a solution for you, but I'm having a similar problem ...and it just started recently. I am using placeholders and they have all stopped working (being recognized).

I was populating the "email" plugin for a form using this code in the "To" line:

{prefix_users___name} <{prefix_users___email}>

and it was working fine for quite some time and now it returns an error. When I replace this with a directly entered email address it works.

Also, in an element, I was using this code:

/pathtofile/file.php?itemid={id}

"id" is my PK and this was an element that used the "link" plugin and it was populating the variable and creating the URL nicely. Now it will not work.

I haven't touched my version of Fabrik recently, but I have updated Joomla to 3.2.2. Is anyone else experiencing this problem? Any ideas?

Thanks!
 
Good Day

In custom form I mean a custom (witch I design), I edit an existing bootstrap template, details view template or a custom search form template. All my custom forms works in joomla 2.5, but know the placeholders or link elements works. It shows blank where the element data must be.

thank you
 
@none007: Placeholders only work in Fabrik admin settings for fields which are eval'd - Fabrik code explicitly replaces the placeholders - it is not something done automatically by php, so they do not work in php files (which is what templates are).

Templates are intended to be generic i.e. to determine how the page is laid out not contain references to specific elements nor contain application logic. So first impressions are that you are probably not using templates how they are intended if you are wanting to reference placeholders in your templates.

That said, a quick look in the wiki brings up two pages: How do I ... Developer? which links to this forum thread about Template variables, and this wiki page on how to Render a single element in a form.

I hope these help.

deepbluecreative: Can you please move your question to a separate thread as it is not at all the same issue as none007's?
 
Thank you for getting back

I promise you I have used placeholders in my detail view and custom search form in Joomla 2.5 and it work 100% without any bugs or problems. But In joomla 3 it does only show blank.

these are the other single element code I used in other templates and it also worked but this code renders blank in joomla3
<?php echo $this->data['dog_jobs___jobs_description']->element ?> (detail view template)
or
<?php echo $this->data['___jobs_country']->element ?> (in my custom search forms)

I have looked at the links and tried that but the elements keep coming up blank.

thank you
 
Have you tried dumping $this->data or $this->data['dog_jobs___jobs_description'] to see what is in them?

Also, if you were using Fabrik 3.0 on Joomla 2.5 and are now using Fabrik 3.1 on Joomla 3 then there are all sorts of internal changes to Fabrik which could be causing this.

Or perhaps it is changes between Joomla 2.5 and Joomla3 which are nothing to do with Fabrik which are causing it.

Either way, I still do not believe that you can use placeholders in templates in Fabrik 3.1. And you should try the techniques documented in the wiki / other forum threads to see if they work.
 
Placeholders are a pain, I just had an example in J!3.2.2/Fabrik3.1 + Git:

A form with some elements readonly to the user, dbjoin element, date element (formatted)
In form's email plugin all placeholders are ok, returning data, labels + formatted date in To, From, Messagetext etc.
In the same form's php plugin the same placeholders are empty in case of readonly and returning only raw values otherwise (PHP code field, no PHP file).
 
Good Day

After a lot of playing the following method is working so far in joomla 3 with latest git;
$this->data or $this->data['dog_jobs___jobs_description']
I just deleted ->element

thank you for all your help. will return support if I can.
 

Members online

No members online now.
Back
Top