@@ -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; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | $glue = apply_filters( 'gravityview/template/field/survey/glue', '; ' ); |
74 | 74 | $multiple_rows_suffix = sprintf( _x( ' (separated by %s)', 'text added to a label if multiple rows are enabled for the field)', 'gravityview' ), esc_html( trim( $glue ) ) ); |
75 | - $show_suffix = (bool) $input_id; |
|
75 | + $show_suffix = (bool)$input_id; |
|
76 | 76 | |
77 | 77 | if ( 'likert' === $field->field->inputType ) { |
78 | 78 | |
@@ -83,11 +83,11 @@ discard block |
||
83 | 83 | 'text' => __( 'Text value of the selected choice', 'gravityview' ) . ( $show_suffix ? '' : $multiple_rows_suffix ), |
84 | 84 | ); |
85 | 85 | |
86 | - if( $field->field->gsurveyLikertEnableScoring ) { |
|
87 | - $likert_display_options['score'] = __( 'Score value of the selected choice', 'gravityview' ) . ( $show_suffix ? '' : $multiple_rows_suffix ); |
|
86 | + if ( $field->field->gsurveyLikertEnableScoring ) { |
|
87 | + $likert_display_options[ 'score' ] = __( 'Score value of the selected choice', 'gravityview' ) . ( $show_suffix ? '' : $multiple_rows_suffix ); |
|
88 | 88 | } |
89 | 89 | |
90 | - $add_options['choice_display'] = array( |
|
90 | + $add_options[ 'choice_display' ] = array( |
|
91 | 91 | 'type' => 'radio', |
92 | 92 | 'label' => __( 'What should be displayed:', 'gravityview' ), |
93 | 93 | 'options' => $likert_display_options, |
@@ -99,8 +99,8 @@ discard block |
||
99 | 99 | ); |
100 | 100 | } |
101 | 101 | |
102 | - if( 'checkbox' === $field->field->inputType && $input_id ) { |
|
103 | - $field_options['choice_display'] = array( |
|
102 | + if ( 'checkbox' === $field->field->inputType && $input_id ) { |
|
103 | + $field_options[ 'choice_display' ] = array( |
|
104 | 104 | 'type' => 'radio', |
105 | 105 | 'class' => 'vertical', |
106 | 106 | 'label' => __( 'What should be displayed:', 'gravityview' ), |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | if ( 'rating' === $field->field->inputType ) { |
119 | - $field_options['choice_display'] = array( |
|
119 | + $field_options[ 'choice_display' ] = array( |
|
120 | 120 | 'type' => 'radio', |
121 | 121 | 'class' => 'vertical', |
122 | 122 | 'label' => __( 'What should be displayed:', 'gravityview' ), |