Skip to content

Commit

Permalink
fixed result page redirect url redirect undefined value issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairraeen committed Sep 2, 2024
1 parent 81a2c15 commit 0c53f67
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion php/admin/options-page-results-page-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function qsm_options_results_tab_template(){
<p><?php esc_html_e( 'Type', 'quiz-master-next' );?> <span class="qsm-hightlight-text"> / </span> <?php esc_html_e( ' to insert template variables', 'quiz-master-next' ); ?></p>
<?php do_action( 'qsm_result_page_before_redirect_input', $quiz_id, $categories ); ?>
<p><?php esc_html_e( 'Or, redirect the user by entering the URL below:', 'quiz-master-next' ); ?></p>
<input type="text" class="results-page-redirect" value="<# if ( data.redirect ) { #>{{ data.redirect }}<# } #>">
<input type="text" class="results-page-redirect" value="<# if ( data.redirect && 'undefined' !== data.redirect) { #>{{ data.redirect }}<# } #>">
<?php do_action( 'qsm_result_page_after', $quiz_id, $categories ); ?>
</div>
</main>
Expand Down
2 changes: 1 addition & 1 deletion php/admin/quiz-options-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function qsm_generate_quiz_options() {
}

$qsm_core_tabs = array( 'questions', 'contact', 'text', 'options', 'emails', 'results-pages', 'style' );
$addon_tabs = '';
$addon_tabs = 0;
?>
<div class="wrap" id="mlw_quiz_wrap">
<div class='mlw_quiz_options' id="mlw_quiz_options">
Expand Down
2 changes: 1 addition & 1 deletion php/template-variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ function qsm_all_contact_fields_variable( $content, $results ) {
return $content;
}
function qsm_get_options_of_contact_fields( $data, $label, $type ) {
if( is_array( $data ) ){
if ( is_array( $data ) ) {
foreach ( $data as $item ) {
if ( $item['label'] === $label && $item['type'] === $type ) {
return $item['options'];
Expand Down

0 comments on commit 0c53f67

Please sign in to comment.