@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | |
48 | 48 | foreach ( $field->choices as $choice ) { |
49 | 49 | if ( is_array( $value ) && RGFormsModel::choice_value_match( $field, $choice, $value[ $input_id ] ) ) { |
50 | - return $choice['score']; |
|
50 | + return $choice[ 'score' ]; |
|
51 | 51 | } else if ( ! is_array( $value ) && RGFormsModel::choice_value_match( $field, $choice, $value ) ) { |
52 | - return $choice['score']; |
|
52 | + return $choice[ 'score' ]; |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
60 | 60 | |
61 | - unset( $field_options['search_filter'] ); |
|
61 | + unset( $field_options[ 'search_filter' ] ); |
|
62 | 62 | |
63 | 63 | if ( 'edit' === $context ) { |
64 | 64 | return $field_options; |
@@ -80,18 +80,18 @@ discard block |
||
80 | 80 | 'text' => __( 'Text value of the selected choice', 'gravityview' ) . ( $show_suffix ? '' : $multiple_rows_suffix ), |
81 | 81 | ); |
82 | 82 | |
83 | - if( $field->field->gsurveyLikertEnableScoring ) { |
|
84 | - $likert_display_options['score'] = __( 'Score value of the selected choice', 'gravityview' ) . ( $show_suffix ? '' : $multiple_rows_suffix ); |
|
83 | + if ( $field->field->gsurveyLikertEnableScoring ) { |
|
84 | + $likert_display_options[ 'score' ] = __( 'Score value of the selected choice', 'gravityview' ) . ( $show_suffix ? '' : $multiple_rows_suffix ); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | // Maintain for back-compatibility |
88 | - $add_options['score'] = array( |
|
88 | + $add_options[ 'score' ] = array( |
|
89 | 89 | 'type' => 'hidden', |
90 | 90 | 'value' => '', |
91 | 91 | 'group' => 'display', |
92 | 92 | ); |
93 | 93 | |
94 | - $add_options['choice_display'] = array( |
|
94 | + $add_options[ 'choice_display' ] = array( |
|
95 | 95 | 'type' => 'radio', |
96 | 96 | 'label' => __( 'What should be displayed:', 'gravityview' ), |
97 | 97 | 'options' => $likert_display_options, |
@@ -103,8 +103,8 @@ discard block |
||
103 | 103 | ); |
104 | 104 | } |
105 | 105 | |
106 | - if( 'checkbox' === $field->field->inputType && $input_id ) { |
|
107 | - $field_options['choice_display'] = array( |
|
106 | + if ( 'checkbox' === $field->field->inputType && $input_id ) { |
|
107 | + $field_options[ 'choice_display' ] = array( |
|
108 | 108 | 'type' => 'radio', |
109 | 109 | 'class' => 'vertical', |
110 | 110 | 'label' => __( 'What should be displayed:', 'gravityview' ), |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | } |
121 | 121 | |
122 | 122 | if ( 'rating' === $field->field->inputType ) { |
123 | - $field_options['choice_display'] = array( |
|
123 | + $field_options[ 'choice_display' ] = array( |
|
124 | 124 | 'type' => 'radio', |
125 | 125 | 'class' => 'vertical', |
126 | 126 | 'label' => __( 'What should be displayed:', 'gravityview' ), |