Commit 887928e8 authored by Angel Matilla's avatar Angel Matilla
Browse files

added selector for forms 11

parent 7702572e
......@@ -172,8 +172,6 @@ class GEN_EU_Registration_Dashboard {
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
}
echo '<h1>GEN EU Registration Dashboard</h1>';
echo '<form action="#" method="post">';
echo '<hr><select name="form-id">';
foreach ( Gen_EU_Form_Parameters::FORM_PICKER as $slug => $form ) {
......@@ -189,11 +187,11 @@ class GEN_EU_Registration_Dashboard {
if(isset($_POST['form-id'])){
$this->form_id = $_POST['form-id'];
$data_source = GEN_EU_Caldera_Forms_Data_Collector::get_instance($this->form_id);
echo "<hr><h1>You are viewing the data for " .Gen_EU_Form_Parameters::FORM_PICKER[$this->form_id]['label'] . "</h1>"; // Displaying Selected Value
echo '<h1>GEN EU Registration Dashboard ' . Gen_EU_Form_Parameters::FORM_PICKER[$this->form_id]['label'] . '</h1>';
echo '<hr>';
}
else{
echo "<hr><h1>You are viewing the data for " .Gen_EU_Form_Parameters::FORM_PICKER[GEN_EU_Form_Parameters::ID]['label'] . "</h1>"; // Displaying Selected Value
echo '<h1>GEN EU Registration Dashboard ' . Gen_EU_Form_Parameters::FORM_PICKER[GEN_EU_Form_Parameters::ID]['label'] . '</h1>';
echo '<hr>';
$data_source = GEN_EU_Caldera_Forms_Data_Collector::get_instance( GEN_EU_Form_Parameters::ID );
}
......
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