Custom add record (signup) form
-
Hi,
I am attempting to create my own add record (signup) form, and am stuck.
What I would like to do is to be able to grab individual input fields, NOT loop through all the input fields.
The current loop works well to retrieve all the given fields in the database:
while ( $this->have_groups() ) : $this->the_group(); while ( $this->have_fields() ) : $this->the_field(); $this->field->print_element_with_id(); endwhile; endwhile;
But what I’m aiming to do is output a single input label / field, something similar to the method used for outputting fields on a listing page.
This will output fields singularly.
$this_record = new PDb_Template($this); $this_record ->print_field('field_name'); ?>
So I was hoping I could use a similar process, instantiate the pdb_template object and then using print_element_with_id( ‘field_name’), output the field.
Unfortunately this does not work. I can’t seem to wrap my head around what I’m doing wrong to be able to output single fields.
If anyone has done this, has a working example I could peek at / point me in the right direction, I’d be most grateful.
thanks!
- The topic ‘Custom add record (signup) form’ is closed to new replies.