Commit 9e57f810 authored by Angel Matilla's avatar Angel Matilla
Browse files

added visualization of option table corrections 6

parent 74d2838c
......@@ -174,8 +174,25 @@ class GEN_EU_Registration_Dashboard {
echo '<form action="#" method="post">';
echo '<hr><select name="form-id">';
foreach ( Gen_EU_Form_Parameters::FORM_PICKER as $slug => $form ) {
echo '<option value="' . esc_attr( $slug ) . '">' . esc_html( $form['label'] ) . '</option>';
if(isset($_POST['form-id'])){
foreach ( Gen_EU_Form_Parameters::FORM_PICKER as $slug => $form ) {
if($slug == Gen_EU_Form_Parameters::FORM_PICKER[$this->form_id]){
echo '<option value="' . esc_attr( $slug ) . '" selected>' . esc_html( $form['label'] ) . '</option>';
}
else{
echo '<option value="' . esc_attr( $slug ) . '">' . esc_html( $form['label'] ) . '</option>';
}
}
}
else{
foreach ( Gen_EU_Form_Parameters::FORM_PICKER as $slug => $form ) {
if($slug == Gen_EU_Form_Parameters::ID){
echo '<option value="' . esc_attr( $slug ) . '" selected>' . esc_html( $form['label'] ) . '</option>';
}
else{
echo '<option value="' . esc_attr( $slug ) . '">' . esc_html( $form['label'] ) . '</option>';
}
}
}
echo '</select>';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment