[Plugin: Participation Database] pdb_single custom template group issue
-
I have followed the info on the website Temaplate Helper Class . And another on the 1.6 page, but i still am unable to get this working as I would like it, and its all do with groups.
Here is a working example, does what I want, lists the fields in the record, but it lists all of them out of 5 groups:
<div class="wrap <?php echo $this->wrap_class ?>"> <?php while ( $this->have_groups() ) : $this->the_group(); ?> <table class="section" id="<?php echo Participants_Db::$css_prefix.$this->group->name ?>"> <?php while ( $this->have_fields() ) : $this->the_field(); ?> <tr class="<?php echo Participants_Db::$css_prefix.$this->field->name.' '.$empty_class?>"> <td width="40%" class="<?php echo $this->field->name.' '.$empty_class?>"><?php $this->field->print_label() ?></td> <td width="40%" name="<?php echo $this->field->name ?>" class="<?php echo $this->field->name.'_input'?>"><?php $this->field->print_value(); ?></td> <td width="20%"> <div class="<?php echo $this->field->name?>_edit"> <a id="edit" href="" name="<?php echo $this->field->name?>">Edit</a> </div> <div class="edit <?php echo $this->field->name?>_save"> <a id="save" href="" name="<?php echo $this->field->name?>">Save</a> </div> </td> </tr> <?php endwhile; // end of the fields loop ?> </table> <?php endwhile; // end of the groups loop ?> </div>
Works a treat.
However, I need it to only use one group to view. So I have been playing with:
$record = new PDb_Template($this); $record = $record->groups['main']; var_dump($record);
$record gives me the group, but I cannot use the methods with it, for example:
echo $record->fields->print_value('city');
gives me either NULL, or fails to load the page.
Any advice on this please ?
Thanks Addy
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Participation Database] pdb_single custom template group issue’ is closed to new replies.