$element-> options?

zebrafilm

Member
The standard detailed listing shows <?php echo $element->name_raw;?> in the template, which shows the records, name and value.
I would like to add the label in front of it, is there a variable that shows the matching element?

Can't find much docs about the $element
 
PHP:
<?php echo $element->label_raw ?>

will output the label text without being surrounded by the <label> HTML tag.

Can't find much docs about the $element
Me neither or though i could have sworn I had documented it - can't find the page in the wiki now though :(
 
What I am trying to achieve:
Element example:
Screen Shot 2013-11-22 at 10.32.35.png

In the detailed listing It already shows the label but I want to display the Name too. (in front of) Is there a way to pull it out and add it into the details listing loop.
label_raw is already there and >name_raw does not work.

Any magic possible in the department lost and found?
 
here's the properties avaliable:

Code:
Array
(
    [0] => startRow
    [1] => endRow
    [2] => error
    [3] => plugin
    [4] => hidden
    [5] => id
    [6] => className
    [7] => containerClass
    [8] => element
    [9] => label_raw
    [10] => label
    [11] => errorTag
    [12] => element_ro
    [13] => value
    [14] => element_raw
    [15] => tipAbove
    [16] => tipBelow
    [17] => tipSide
    [18] => offset
    [19] => span
    [20] => column
)

I guess you could hack out the name from the id:

Code:
$name = explode('___', $element->id)[1];
 
That starts to work, except I get behind everything: "_ro", so the userid name becomes: userid_ro
Is there another way to avoid it or does it need some string trimming.
 
more trimming i guess:

PHP:
$name = explode('___', $element->id)[1];
$name = FabrikString::rtrimword($name, '_ro');
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top