• Resolved Rem_FR

    (@rem_fr)


    Hello,

    I have edited pdb-single-river.php and use the shortcode [pdb_single template=”river”] to display datas. I’d like to hide the group field title called “votre inscription” name :”personal”
    https://joggingclublicquois.fr/inscription/single-fiche/?pdb=23

    I don’t know how to do that

    Here is my file pdb-single-river.php

    <?php
    /*
     * default template for displaying a single record
     *
     * this is the new "WordPress style" template
     *
     * each group with the "visible" attribute checked will display its fields in the order set
     * in the manage database fields page.
     *
     * if there are specific fields you wish to exclude from display, you can include the "name" value of
     * the field in the $exclude array like this: $exclude = array( 'city','state','country' ); or whatever
     * you want. Leave it empty (like it is here) if you don't want to exclude any fields.
     *
     * this template is a simple demonstration of what is possible
     *
     * for those unfamiliar with PHP, just remember that something like <?php echo $group->name ?> just prints out
     * the group name. You can move it around, but leave all the parts between the <> brackets as they are.
     *
     */
    
    // define an array of fields to exclude here
    $exclude = array('mailing','phone','country','address','zip','email','suppression');
    
    ?>
    
    <div class="wrap <?php echo $this->wrap_class ?>">
    
      <?php while ( $this->have_groups() ) : $this->the_group(); ?>
    
      <div class="section" id="<?php echo Participants_Db::$prefix.$this->group->name ?>">
    
        <?php $this->group->print_title( '<h2>', '</h2>' ) ?>
    
        <?php $this->group->print_description( '<p>', '</p>' ) ?>
    
          <?php while ( $this->have_fields() ) : $this->the_field();
    
              // skip any field found in the exclude array
              if ( in_array( $this->field->name, $exclude ) ) continue;
    
              // CSS class for empty fields
    					$empty_class = $this->get_empty_class( $this->field );
    
          ?>
    
        <dl class="<?php echo Participants_Db::$prefix.$this->field->name.' '.$this->field->form_element.' '.$empty_class?>">
    
          <dt class="<?php echo $this->field->name.' '.$empty_class?>"><?php $this->field->print_label() ?></dt>
    
          <dd class="<?php echo $this->field->name.' '.$empty_class?>"><?php $this->field->print_value() ?></dd>
    
        </dl>
    
        	<?php endwhile; // end of the fields loop ?>
    
      </div>
    
      <?php endwhile; // end of the groups loop ?>
    
    </div>

    Thanks for your help

    https://www.ads-software.com/plugins/participants-database/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    You can simply delete the title from the group in the Manage Database Fields page.

    Thread Starter Rem_FR

    (@rem_fr)

    Yes but i will hide also in my page with the shortcode [pdb_record].
    I am going to to this if this is the simple solution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide one name of group field’ is closed to new replies.