Commit 0a698684 authored by Kenneth Hall's avatar Kenneth Hall

Merge branch 'issue#3663' into 'develop'

removed backbone data from field meta

Closes #3663

See merge request ninja-forms/ninja-forms!3651
parents ee0e1dab c5a11d78
......@@ -67,11 +67,14 @@ final class NF_Database_FieldsController
foreach( $this->fields_data as $field_data ){
$field_id = $field_data[ 'id' ];
foreach( $field_data[ 'settings' ] as $key => $value ){
if( isset( $existing_meta[ $field_id ][ $key ] ) ){
if( $value == $existing_meta[ $field_id ][ $key ] ) continue;
$this->update_field_meta( $field_id, $key, $value );
} else {
$this->insert_field_meta( $field_id, $key, $value );
// we don't need object type or domain stored in the db
if( ! in_array( $key, array( 'objectType', 'objectDomain' ) ) ) {
if( isset( $existing_meta[ $field_id ][ $key ] ) ){
if( $value == $existing_meta[ $field_id ][ $key ] ) continue;
$this->update_field_meta( $field_id, $key, $value );
} else {
$this->insert_field_meta( $field_id, $key, $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