Ok I change to this first
<?php
/*
* default template for the [pdb_record] shortcode for editing a record on the frontend
*
* this template uses a table to format the form
*/
?>
<?php if ($this->participants_values['approved'] === 'non' ) : ?>
<div class="wrap <?php echo $this->wrap_class ?>">
<?php // output any validation errors
$this->print_errors(); ?>
<?php // print the form header
$this->print_form_head()
?>
<?php while ($this->have_groups()) : $this->the_group(); ?>
<?php $this->group->print_title() ?>
<?php $this->group->print_description() ?>
<table class="form-table">
<tbody class="field-group field-group-<?php echo $this->group->name ?>">
<?php
// step through the fields in the current group
while ($this->have_fields()) : $this->the_field();
?>
<tr class="<?php $this->field->print_element_class() ?>">
<th><?php $this->field->print_label() ?></th>
<td id="<?php $this->field->print_element_id() ?>">
<?php $this->field->print_element(); ?>
<?php if ($this->field->has_help_text()) : ?>
<span class="helptext"><?php $this->field->print_help_text() ?></span>
<?php endif ?>
</td>
</tr>
<?php endwhile; // field loop ?>
</tbody>
</table>
<?php endwhile; // group loop ?>
<table class="form-table">
<tbody class="field-group field-group-submit">
<tr>
<th><h3><?php $this->print_save_changes_label() ?></h3></th>
<td class="submit-buttons">
<?php $this->print_submit_button('button-primary'); // you can specify a class for the button ?>
</td>
</tr>
</tbody>
</table><!-- end group -->
<?php $this->print_form_close() ?>
</div>
<?php else : ?>
Désolé, vous n'avez plus le droit d'éditer votre fiche pour l'instant !
<?php endif ?>
This sentence “Désolé, vous n’avez plus le droit d’éditer votre fiche pour l’instant !” appears all the time even if i checked approved field or not. So i think there is an error with that code
Then i modified to
<?php if ($this->participants_values[‘approved’] !== ‘non’ ) : ?>
This time, no sentence and the participant can change his record.
So with
<?php if ($this->participants_values['approved'] !== 'non' ) : ?>
or
<?php if ($this->participants_values['approved'] === 'non' ) : ?>
though values are different in 2 participants record, i get the same resultat