GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
class-gravityview-field-quiz.php
Go to the documentation of this file.
1 <?php
2 /**
3  * @file class-gravityview-field-gquiz_score.php
4  * @package GravityView
5  * @subpackage includes\fields
6  */
7 
9 
10  var $name = 'quiz';
11 
12  var $group = 'advanced';
13 
14  public function __construct() {
15  $this->label = esc_html__( 'Quiz', 'gravityview' );
16  parent::__construct();
17  }
18 
19  function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
20 
21  if( 'edit' === $context ) {
22  return $field_options;
23  }
24 
25  $new_fields = array(
26  'quiz_show_explanation' => array(
27  'type' => 'checkbox',
28  'label' => __( 'Show Answer Explanation?', 'gravityview' ),
29  'desc' => __('If the field has an answer explanation, show it?', 'gravityview'),
30  'value' => false,
31  'merge_tags' => false,
32  ),
33  );
34 
35  return $new_fields + $field_options;
36  }
37 
38 }
39 
Modify field settings by extending this class.
field_options($field_options, $template_id, $field_id, $context, $input_type)
$field_id
Definition: time.php:17
new GravityView_Field_Quiz