Skip to content

Commit

Permalink
Added hook to show select tag for fill in the blank
Browse files Browse the repository at this point in the history
  • Loading branch information
iam-pranav committed Nov 30, 2023
1 parent 37d5313 commit 1ed21a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions php/question-types/qsm-question-title.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ function qsm_question_title_func( $question, $question_type = '', $new_question_
$allow_html['input']['class'] = 1;
$allow_html['input']['id'] = 1;
$allow_html['input']['maxlength'] = 1;
$allow_html['select']['name'] = 1;
$allow_html['select']['class'] = 1;
$allow_html['select']['id'] = 1;
$allow_html['option']['value'] = 1;
?>
<p><?php echo do_shortcode( wp_kses( $question_title . $deselect_answer, $allow_html ) ); ?></p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function qmn_fill_blank_display( $id, $question, $answers ) {
$mlw_require_class = '';
}
$input_text = '<input ' . $autofill_att . $limit_text_att . " type='text' class='qmn_fill_blank $mlw_require_class' name='question" . $id . "[]' />";
$input_text = apply_filters( 'qsm_fill_in_blanks_input_after', $input_text, $id, $question, $answers, $mlw_require_class );
if ( strpos( $question, '%BLANK%' ) !== false ) {
$question = str_replace( '%BLANK%', $input_text, do_shortcode( htmlspecialchars_decode( $question, ENT_QUOTES ) ) );
}
Expand Down

0 comments on commit 1ed21a8

Please sign in to comment.