Commit ec8ad535 authored by Eric Windham's avatar Eric Windham

Merge branch 'issue#3690' into 'develop'

Issue#3690

Closes #3690

See merge request ninja-forms/ninja-forms!3661
parents 1790d772 394679e1
......@@ -153,8 +153,14 @@ class NF_Fields_Checkbox extends NF_Abstracts_Input
__( 'unchecked', 'ninja-forms' ) == $value ) return $value;
// Creating settings variables for our check.
$checked_setting = $field->get_setting( 'checked_value' );
$unchecked_setting = $field->get_setting( 'unchecked_value' );
if( is_array( $field ) ) {
// The email action sends teh field variable as an array
$checked_setting = $field[ 'setting' ][ 'checked_value' ];
$unchecked_setting = $field[ 'setting' ][ 'unchecked_value' ];
} else {
$checked_setting = $field->get_setting( 'checked_value' );
$unchecked_setting = $field->get_setting( 'unchecked_value' );
}
// If the the value and check to see if we have checked and unchecked settings...
if ( 1 == $value && ! empty( $checked_setting ) ) {
......
......@@ -42,7 +42,7 @@ class NF_Fields_Textbox extends NF_Abstracts_Input
* sanitize this in case someone tries to inject data that runs in
* Excel and similar apps
* */
if( 0 < strlen($field_value ) ) {
if( 0 < strlen( $field_value ) ) {
$first_char = substr( $field_value, 0, 1 );
if( in_array( $first_char, array( '=', '@', '+', '-' ) ) ) {
return "'" . $field_value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment