Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, here’s what I did. File /templates/pdb-single-default.php.

    This is the code that handles the display of the single record. Lines 55 – 72 of the file.

    <dl>
    
          <?php // this prints out all the fields in the group
    			foreach( $group->fields as $field ) : 
    
              $value = Participants_Db::prep_field_for_display( $field->value, $field->form_element );
    
    					$empty_class = empty( $value ) ? 'blank-field' : '';
    
          ?>
    
          <dt class="<?php echo $field->name.' '.$empty_class?>"><?php echo $field->title ?></dt>
    
          <dd class="<?php echo $field->name.' '.$empty_class?>"><?php echo $value ?></dd>
    
        	<?php endforeach; // end of the fields loop ?>
    
        </dl>

    I changed it to:

    <div>
    
          <?php // this prints out all the fields in the group
    			foreach( $group->fields as $field ) :
    
              $value = Participants_Db::prep_field_for_display( $field->value, $field->form_element );
    
    					$empty_class = empty( $value ) ? 'blank-field' : '';
    
          ?>
    
          <p class="<?php echo $field->name.' '.$empty_class?>"><B><?php echo $field->title ?>:</B> <?php echo $value ?></p>
    
        	<?php endforeach; // end of the fields loop ?>
    
        </div>

    Now records display like this, ignore the spacing, it looks better on a web page:

    Last Name: AARON
    First Name: J
    Soldier Number:4457224
    Regt / Unit: The Durham Light Infantry

    Anyway, the area of the code above is what you need to edit to alter the display of the single record page. You can use classes and the like in the <div> tags to take advantage of your current CSS.

    Wayne

    Thread Starter r3ap3r666

    (@r3ap3r666)

    would you be able to create the CSS for me? please

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Participants Database] I NEED HELP!!’ is closed to new replies.