How do you echo elements values in form view like details view?

dealio

Member
Hi is how would you go about echo'ing the elements out in the form template view similar to how its done in details template view.

Currently in details view template you can print each element like

<?php
foreach($this->groups as $key=>$group){
foreach($group->elements as $ekey=>$evalue)
{
$this->elements[$ekey] = $evalue;
}
}
?>

<?php echo $this->elements['first_name]->element_raw;?>
<?php echo $this->elements['last_name]->element_raw;?>



Can this be done in form template view? I want to give users a "quick details view" of just a few elements but I don't know the syntax.


Any help is much appreciated.

Thanks
 
It doesn't sound to me like this is something you should do with a template change, but rather you should copy the form (and associated groups and elements?) and unpublish the copied elements that you don't want to show.
 
This is more of just seeing the elements without the element input tag< type=input... container , like how its done in the view details. I just want to do this for a handful of elements. Like this:

====My form start====
<form......
<?php $this->element = $this->groups['contact']->elements['fiest_name']; echo $this->loadTemplate('element');?>
<?php $this->element = $this->groups[contact]; echo $this->loadTemplate('element');?>
<?php $this->element = $this->groups['contact-[location]']->elements['city']; echo $this->loadTemplate('element');?>

... form>
<br></br>

Now I want to put his under the form or at the top of the forms page. I don't know the syntax to call the elements.
---------------------------
<div style=boerder 5px solid #000000;>
<?php echo 'Hello' echo $this->elements['first_name]->element_raw;?>, <?php echo $this->elements['last_name]->element_raw;?>,<?php echo 'you are in' echo $this->elements['city]->element_raw;?>
</div>

i don't know the syntax.
====end====

i don't know the syntax.
 
You can have several groups in a form or page. Put the elements you want to show separately into a separate group and sequence that as you want. You can also hide or show groups independently if that helps.

S
 
This isn't about grouping, its about displaying the editable element container vs just the output print echo value.


I don't want it to look like input field rather echo out the raw value so i can plug it int to a paragraph or sentence.




This doee not work in form view template because I have the syntax wrong, I'm trying to find the correct syntax.

<?php echo 'Hello' echo $this->elements['first_name]->element_raw;?>
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top