From 2aec9b2fa7a39e263372ba9dbb5f403e5b54d8ef Mon Sep 17 00:00:00 2001 From: Sashi20 Date: Fri, 26 Jul 2019 16:29:41 +0530 Subject: Modify the position in the last step and headings of each page --- esim_workshop_form.module | 12 +- esim_workshop_form_2019.inc | 242 ++++++++++++++++++++-------------------- images/AstableMultivibrator.png | Bin 19353 -> 22115 bytes 3 files changed, 129 insertions(+), 125 deletions(-) diff --git a/esim_workshop_form.module b/esim_workshop_form.module index f711712..8232c1f 100755 --- a/esim_workshop_form.module +++ b/esim_workshop_form.module @@ -28,7 +28,7 @@ function esim_workshop_form_menu() 'file' => 'esim_workshop_form_2019.inc' ); $items['esim-workshop/form/step2'] = array( - 'title' => t('eSim Workshop Form'), + 'title' => t('Important Instructions for Participants'), 'page callback' => 'drupal_get_form', 'page arguments' => array( 'esim_workshop_step2_form' @@ -39,7 +39,7 @@ function esim_workshop_form_menu() 'file' => 'esim_workshop_form_2019.inc' ); $items['esim-workshop/form/step3'] = array( - 'title' => t('eSim Workshop Form'), + 'title' => t('Schematic Creation'), 'page callback' => 'drupal_get_form', 'page arguments' => array( 'esim_workshop_step3_form' @@ -50,7 +50,7 @@ function esim_workshop_form_menu() 'file' => 'esim_workshop_form_2019.inc' ); $items['esim-workshop/form/step4'] = array( - 'title' => t('eSim Workshop Form'), + 'title' => t('Simulation and Hardware'), 'page callback' => 'drupal_get_form', 'page arguments' => array( 'esim_workshop_step4_form' @@ -61,7 +61,7 @@ function esim_workshop_form_menu() 'file' => 'esim_workshop_form_2019.inc' ); $items['esim-workshop/form/step5'] = array( - 'title' => t('eSim Workshop Form'), + 'title' => t('PCB designing'), 'page callback' => 'drupal_get_form', 'page arguments' => array( 'esim_workshop_step5_form' @@ -72,7 +72,7 @@ function esim_workshop_form_menu() 'file' => 'esim_workshop_form_2019.inc' ); $items['esim-workshop/form/step6'] = array( - 'title' => t('eSim Workshop Form'), + 'title' => t('Documentation and Submission'), 'page callback' => 'drupal_get_form', 'page arguments' => array( 'esim_workshop_step6_form' @@ -189,7 +189,7 @@ function esim_workshop_file_path() function workshop_project_file_check_valid_filename($file_name) { - if (!preg_match('/^[0-9]{4}$/', $file_name)) + if (!preg_match('/^[0-9]{4}/', $file_name)) return FALSE; else if (substr_count($file_name, ".") > 1) return FALSE; diff --git a/esim_workshop_form_2019.inc b/esim_workshop_form_2019.inc index af24adf..3a18e17 100644 --- a/esim_workshop_form_2019.inc +++ b/esim_workshop_form_2019.inc @@ -419,6 +419,12 @@ Create a circuit schematic of an ‘Astable Multivibrator’ as shown in Figure '#title' => t('I could successfully create the circuit schematic'), '#required' => TRUE, '#default_value' => $step3_data->step3_checkbox_status, + ); + $form['step3_field1_fieldset']['step3_checkbox_status_1'] = array( + '#type' => 'checkbox', + '#title' => t('I have carefully chosen components only from eSim_Devices, eSim_Sources and eSim_Plot category during component selection'), + '#required' => TRUE, + '#default_value' => $step3_data->step3_checkbox_status_1, ); $form["step3_page_id"] = array( "#type" => "hidden", @@ -451,6 +457,11 @@ Create a circuit schematic of an ‘Astable Multivibrator’ as shown in Figure '#type' => 'checkbox', '#title' => t('I could successfully create the circuit schematic'), '#required' => TRUE, + ); + $form['step3_field1_fieldset']['step3_checkbox_status_1'] = array( + '#type' => 'checkbox', + '#title' => t('I have carefully chosen components only from eSim_Devices, eSim_Sources and eSim_Plot category during component selection'), + '#required' => TRUE, ); $form["step3_page_id"] = array( "#type" => "hidden", @@ -484,13 +495,11 @@ function esim_workshop_step3_form_previous_submit($form, &$form_state, $no_js_us $form_step3_data = $query->execute()->fetchObject(); if ($form_step3_data) { - if ($form_state['values']['step3_field1_fieldset']['step3_checkbox_status'] == 1){ - $step3_checkbox_status = 1; - } - $query = "UPDATE esim_workshop_2019_form_step3_feedback SET step3_checkbox_status=:step3_checkbox_status, data_relation=:data_relation WHERE uid=:uid "; + $query = "UPDATE esim_workshop_2019_form_step3_feedback SET step3_checkbox_status=:step3_checkbox_status, step3_checkbox_status_1=:step3_checkbox_status_1, data_relation=:data_relation WHERE uid=:uid "; $args = array( ":uid" => $user->uid, - ":step3_checkbox_status" => $step3_checkbox_status, + ":step3_checkbox_status" => $v['step3_field1_fieldset']['step3_checkbox_status'], + ":step3_checkbox_status_1" => $v['step3_field1_fieldset']['step3_checkbox_status_1'], ":data_relation" => "step3" ); /* storing the row id in $result */ @@ -503,10 +512,11 @@ function esim_workshop_step3_form_previous_submit($form, &$form_state, $no_js_us if ($form_state['values']['step3_field1_fieldset']['step3_checkbox_status'] == 1){ $step3_checkbox_status = 1; } - $query = "INSERT INTO {esim_workshop_2019_form_step3_feedback} (uid, step3_checkbox_status, data_relation,inserted_on) VALUES (:uid,:step3_checkbox_status, :data_relation,:inserted_on)"; + $query = "INSERT INTO {esim_workshop_2019_form_step3_feedback} (uid, step3_checkbox_status,step3_checkbox_status_1, data_relation,inserted_on) VALUES (:uid,:step3_checkbox_status,s:step3_checkbox_status_1, :data_relation,:inserted_on)"; $args = array( ":uid" => $user->uid, - ":step3_checkbox_status" => $step3_checkbox_status, + ":step3_checkbox_status" => $v['step3_field1_fieldset']['step3_checkbox_status'], + ":step3_checkbox_status_1" => $v['step3_field1_fieldset']['step3_checkbox_status_1'], ":data_relation" => "step3", ":inserted_on" => date('Y-m-d') ); @@ -527,13 +537,11 @@ function esim_workshop_step3_form_next_submit($form, &$form_state, $no_js_use = $form_step3_data = $query->execute()->fetchObject(); if ($form_step3_data) { - if ($form_state['values']['step3_field1_fieldset']['step3_checkbox_status'] == 1){ - $step3_checkbox_status = 1; - } - $query = "UPDATE esim_workshop_2019_form_step3_feedback SET step3_checkbox_status=:step3_checkbox_status, data_relation=:data_relation WHERE uid=:uid "; + $query = "UPDATE esim_workshop_2019_form_step3_feedback SET step3_checkbox_status=:step3_checkbox_status, step3_checkbox_status_1=:step3_checkbox_status_1, data_relation=:data_relation WHERE uid=:uid "; $args = array( ":uid" => $user->uid, - ":step3_checkbox_status" => $step3_checkbox_status, + ":step3_checkbox_status" => $v['step3_field1_fieldset']['step3_checkbox_status'], + ":step3_checkbox_status_1" => $v['step3_field1_fieldset']['step3_checkbox_status_1'], ":data_relation" => "step3" ); /* storing the row id in $result */ @@ -543,13 +551,11 @@ function esim_workshop_step3_form_next_submit($form, &$form_state, $no_js_use = } //$form_step3_data else { - if ($form_state['values']['step3_field1_fieldset']['step3_checkbox_status'] == 1){ - $step3_checkbox_status = 1; - } - $query = "INSERT INTO {esim_workshop_2019_form_step3_feedback} (uid, step3_checkbox_status, data_relation,inserted_on) VALUES (:uid,:step3_checkbox_status, :data_relation,:inserted_on)"; + $query = "INSERT INTO {esim_workshop_2019_form_step3_feedback} (uid, step3_checkbox_status,step3_checkbox_status_1, data_relation,inserted_on) VALUES (:uid,:step3_checkbox_status,s:step3_checkbox_status_1, :data_relation,:inserted_on)"; $args = array( ":uid" => $user->uid, - ":step3_checkbox_status" => $step3_checkbox_status, + ":step3_checkbox_status" => $v['step3_field1_fieldset']['step3_checkbox_status'], + ":step3_checkbox_status_1" => $v['step3_field1_fieldset']['step3_checkbox_status_1'], ":data_relation" => "step3", ":inserted_on" => date('Y-m-d') ); @@ -609,77 +615,77 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE) $form['step4_field1_fieldset']['observation_table_header_1'] = array( '#type' => 'item', '#prefix' => '
',
- '#markup' => ' Resistor Values ', + '#markup' => 'Resistor Values ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_header_2'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Physical observation over PCB ', + '#markup' => 'Physical observation over PCB ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_header_3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Simulation results using eSim ', + '#markup' => 'Simulation results using eSim ', '#suffix' => ' | |||||||||||||||||||||||||||||||||
',
- '#markup' => ' R3 ', + '#markup' => 'R3 ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_sub_header_2'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' R4 ', + '#markup' => 'R4 ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_sub_header_3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Number of times LED1 blinks in 12 seconds ', + '#markup' => 'Number of times LED1 blinks in 12 seconds ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_sub_header_4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Number of times LED2 blinks in 12 seconds ', + '#markup' => 'Number of times LED2 blinks in 12 seconds ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_sub_header_5'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Number of positive peaks across LED1 in 12 seconds ', + '#markup' => 'Number of positive peaks across LED1 in 12 seconds ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_sub_header_6'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Number of positive peaks across LED2 in 12 seconds ', + '#markup' => 'Number of positive peaks across LED2 in 12 seconds ', '#suffix' => ' | ||||||||||||||||||||||||||||||
',
- '#markup' => ' 68K ', + '#markup' => '68K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row1_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 68K ', + '#markup' => '68K ', '#suffix' => ' | ',
);
@@ -714,14 +720,14 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE)
$form['step4_field1_fieldset']['observation_table_reading_row2_r3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 150K ', + '#markup' => '150K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row2_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 150K ', + '#markup' => '150K ', '#suffix' => ' | ',
);
@@ -756,14 +762,14 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE)
$form['step4_field1_fieldset']['observation_table_reading_row3_r3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 33K ', + '#markup' => '33K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row3_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 33K ', + '#markup' => '33K ', '#suffix' => ' | ',
);
@@ -798,14 +804,14 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE)
$form['step4_field1_fieldset']['observation_table_reading_row4_r3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 101K ', + '#markup' => '101K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row4_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 33K ', + '#markup' => '33K ', '#suffix' => ' | ',
);
@@ -840,14 +846,14 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE)
$form['step4_field1_fieldset']['observation_table_reading_row5_r3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 183K ', + '#markup' => '183K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row5_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 218K ', + '#markup' => '218K ', '#suffix' => ' | ',
);
@@ -882,14 +888,14 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE)
$form['step4_field1_fieldset']['observation_table_reading_row6_r3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 218K ', + '#markup' => '218K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row6_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 101K ', + '#markup' => '101K ', '#suffix' => ' | ',
);
@@ -981,77 +987,77 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE)
$form['step4_field1_fieldset']['observation_table_header_1'] = array(
'#type' => 'item',
'#prefix' => '
',
- '#markup' => ' Resistor Values ', + '#markup' => 'Resistor Values ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_header_2'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Physical observation over PCB ', + '#markup' => 'Physical observation over PCB ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_header_3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Simulation results using eSim ', + '#markup' => 'Simulation results using eSim ', '#suffix' => ' | |||||||||
',
- '#markup' => ' R3 ', + '#markup' => 'R3 ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_sub_header_2'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' R4 ', + '#markup' => 'R4 ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_sub_header_3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Number of times LED1 blinks in 12 seconds ', + '#markup' => 'Number of times LED1 blinks in 12 seconds ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_sub_header_4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Number of times LED2 blinks in 12 seconds ', + '#markup' => 'Number of times LED2 blinks in 12 seconds ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_sub_header_5'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Number of positive peaks across LED1 in 12 seconds ', + '#markup' => 'Number of positive peaks across LED1 in 12 seconds ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_sub_header_6'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' Number of positive peaks across LED2 in 12 seconds ', + '#markup' => 'Number of positive peaks across LED2 in 12 seconds ', '#suffix' => ' | ||||||
',
- '#markup' => ' 68K ', + '#markup' => '68K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row1_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 68K ', + '#markup' => '68K ', '#suffix' => ' | ',
);
@@ -1086,14 +1092,14 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE)
$form['step4_field1_fieldset']['observation_table_reading_row2_r3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 150K ', + '#markup' => '150K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row2_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 150K ', + '#markup' => '150K ', '#suffix' => ' | ',
);
@@ -1128,14 +1134,14 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE)
$form['step4_field1_fieldset']['observation_table_reading_row3_r3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 33K ', + '#markup' => '33K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row3_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 33K ', + '#markup' => '33K ', '#suffix' => ' | ',
);
@@ -1170,14 +1176,14 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE)
$form['step4_field1_fieldset']['observation_table_reading_row4_r3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 101K ', + '#markup' => '101K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row4_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 33K ', + '#markup' => '33K ', '#suffix' => ' | ',
);
@@ -1212,14 +1218,14 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE)
$form['step4_field1_fieldset']['observation_table_reading_row5_r3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 183K ', + '#markup' => '183K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row5_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 218K ', + '#markup' => '218K ', '#suffix' => ' | ',
);
@@ -1254,14 +1260,14 @@ function esim_workshop_step4_form($form, &$form_state, $no_js_use = FALSE)
$form['step4_field1_fieldset']['observation_table_reading_row6_r3'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 218K ', + '#markup' => '218K ', '#suffix' => ' | ',
);
$form['step4_field1_fieldset']['observation_table_reading_row6_r4'] = array(
'#type' => 'item',
'#prefix' => '',
- '#markup' => ' 101K ', + '#markup' => '101K ', '#suffix' => ' | ',
);
@@ -1615,10 +1621,6 @@ function esim_workshop_step5_form($form, &$form_state, $no_js_use = FALSE)
global $base_url;
global $user;
$img_path = $base_url . '/' . drupal_get_path("module", "esim_workshop_form") . '/images';
- $step5_options = array(
- 'Yes' => 'Yes',
- 'No' => 'No'
- );
$form = array();
$form['step5_field1_fieldset'] = array(
'#type' => 'fieldset',
@@ -1648,7 +1650,6 @@ function esim_workshop_step5_form($form, &$form_state, $no_js_use = FALSE)
$form['step5_field1_fieldset']['step5_checkbox_status_2'] = array(
'#type' => 'checkbox',
'#title' => t('I could successfully generate the gerber files'),
- '#required' => TRUE,
'#default_value' => $step5_data->step5_checkbox_status_2,
);
$form["step5_page_id"] = array(
@@ -1685,8 +1686,7 @@ function esim_workshop_step5_form($form, &$form_state, $no_js_use = FALSE)
$form['step5_field1_fieldset']['step5_checkbox_status_2'] = array(
'#type' => 'checkbox',
'#title' => t('I could successfully generate the gerber files'),
- '#required' => TRUE,
- );
+ );
$form["step5_page_id"] = array(
"#type" => "hidden",
"#value" => "step5"
@@ -1719,17 +1719,11 @@ function esim_workshop_step5_form_previous_submit($form, &$form_state, $no_js_us
$form_step5_data = $query->execute()->fetchObject();
if ($form_step5_data)
{
- if ($form_state['values']['step5_field1_fieldset']['step5_checkbox_status_1'] == 1){
- $step5_checkbox_status_1 = 1;
-
- if ($form_state['values']['step5_field1_fieldset']['step5_checkbox_status_2'] == 1)
- $step5_checkbox_status_2 = 1;
- }
$query = "UPDATE esim_workshop_2019_form_step5_feedback SET step5_checkbox_status_1=:step5_checkbox_status_1, step5_checkbox_status_2=:step5_checkbox_status_2, data_relation=:data_relation WHERE uid=:uid ";
$args = array(
":uid" => $user->uid,
- ":step5_checkbox_status_1" => $step5_checkbox_status_1,
- ":step5_checkbox_status_2" => $step5_checkbox_status_2,
+ ":step5_checkbox_status_1" => $v['step5_field1_fieldset']['step5_checkbox_status_1'],
+ ":step5_checkbox_status_2" => $v['step5_field1_fieldset']['step5_checkbox_status_2'],
":data_relation" => "step5"
);
/* storing the row id in $result */
@@ -1739,17 +1733,11 @@ function esim_workshop_step5_form_previous_submit($form, &$form_state, $no_js_us
} //$form_step5_data
else
{
- if ($form_state['values']['step5_field1_fieldset']['step5_checkbox_status_1'] == 1){
- $step5_checkbox_status_1 = 1;
-
- if ($form_state['values']['step5_field1_fieldset']['step5_checkbox_status_2'] == 1)
- $step5_checkbox_status_2 = 1;
- }
$query = "INSERT INTO {esim_workshop_2019_form_step5_feedback} (uid, step5_checkbox_status_1, step5_checkbox_status_2, data_relation,inserted_on) VALUES (:uid,:step5_checkbox_status_1, :step5_checkbox_status_2, :data_relation,:inserted_on)";
$args = array(
":uid" => $user->uid,
- ":step5_checkbox_status_1" => $step5_checkbox_status_1,
- ":step5_checkbox_status_2" => $step5_checkbox_status_2,
+ ":step5_checkbox_status_1" => $v['step5_field1_fieldset']['step5_checkbox_status_1'],
+ ":step5_checkbox_status_2" => $v['step5_field1_fieldset']['step5_checkbox_status_2'],
":data_relation" => "step5",
":inserted_on" => date('Y-m-d')
);
@@ -1770,17 +1758,11 @@ function esim_workshop_step5_form_next_submit($form, &$form_state, $no_js_use =
$form_step5_data = $query->execute()->fetchObject();
if ($form_step5_data)
{
- if ($form_state['values']['step5_field1_fieldset']['step5_checkbox_status_1'] == 1){
- $step5_checkbox_status_1 = 1;
-
- if ($form_state['values']['step5_field1_fieldset']['step5_checkbox_status_2'] == 1)
- $step5_checkbox_status_2 = 1;
- }
$query = "UPDATE esim_workshop_2019_form_step5_feedback SET step5_checkbox_status_1=:step5_checkbox_status_1,step5_checkbox_status_2=:step5_checkbox_status_2, data_relation=:data_relation WHERE uid=:uid ";
$args = array(
":uid" => $user->uid,
- ":step5_checkbox_status_1" => $step5_checkbox_status_1,
- ":step5_checkbox_status_2" => $step5_checkbox_status_2,
+ ":step5_checkbox_status_1" => $v['step5_field1_fieldset']['step5_checkbox_status_1'],
+ ":step5_checkbox_status_2" => $v['step5_field1_fieldset']['step5_checkbox_status_2'],
":data_relation" => "step5"
);
/* storing the row id in $result */
@@ -1790,17 +1772,11 @@ function esim_workshop_step5_form_next_submit($form, &$form_state, $no_js_use =
} //$form_step5_data
else
{
- if ($form_state['values']['step5_field1_fieldset']['step5_checkbox_status_1'] == 1){
- $step5_checkbox_status_1 = 1;
-
- if ($form_state['values']['step5_field1_fieldset']['step5_checkbox_status_2'] == 1)
- $step5_checkbox_status_2 = 1;
- }
$query = "INSERT INTO {esim_workshop_2019_form_step5_feedback} (uid, step5_checkbox_status_1,step5_checkbox_status_2, data_relation,inserted_on) VALUES (:uid,:step5_checkbox_status_1,:step5_checkbox_status_2 ,:data_relation,:inserted_on)";
$args = array(
":uid" => $user->uid,
- ":step5_checkbox_status_1" => $step5_checkbox_status_1,
- ":step5_checkbox_status_2" => $step5_checkbox_status_2,
+ ":step5_checkbox_status_1" => $v['step5_field1_fieldset']['step5_checkbox_status_1'],
+ ":step5_checkbox_status_2" => $v['step5_field1_fieldset']['step5_checkbox_status_2'],
":data_relation" => "step5",
":inserted_on" => date('Y-m-d')
);
@@ -1820,18 +1796,19 @@ function esim_workshop_step6_form($form, &$form_state, $no_js_use = FALSE)
global $user;
$img_path = $base_url . '/' . drupal_get_path("module", "esim_workshop_form") . '/images';
$form = array();
- $form['step6_field1_fieldset'] = array(
+ $form['step6_field2_fieldset'] = array(
'#type' => 'fieldset',
'#tree' => TRUE,
- '#prefix' => '