We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
gw-capitilize-submitted-data.php
1 parent 121315e commit 7d6697eCopy full SHA for 7d6697e
gravity-forms/gw-capitilize-submitted-data.php
@@ -27,8 +27,14 @@ function gw_capitalize_submitted_data( $form ) {
27
$_POST[ $input_key ] = ucwords( strtolower( rgpost( $input_key ) ) );
28
}
29
} else {
30
- $input_key = sprintf( 'input_%s', $field['id'] );
31
- $_POST[ $input_key ] = ucwords( strtolower( rgpost( $input_key ) ) );
+ $input_key = sprintf( 'input_%s', $field['id'] );
+ if ( is_array( $_POST[ $input_key ] ) ) {
32
+ $_POST[ $input_key ] = array_map( function( $value ) {
33
+ return ucwords( strtolower( $value ) );
34
+ }, $_POST[ $input_key ] );
35
+ } else {
36
+ $_POST[ $input_key ] = ucwords( strtolower( rgpost( $input_key ) ) );
37
+ }
38
39
40
0 commit comments