File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -48,17 +48,14 @@ public function getFormField()
48
48
49
49
public function getValueFromData ($ data )
50
50
{
51
- $ incoming = isset ($ data [$ this ->Name ]) ? $ data [$ this ->Name ] : false ;
52
-
53
- if (!$ incoming ) {
54
- return json_encode ([]);
55
- }
56
-
51
+ $ incoming = isset ($ data [$ this ->Name ]) ? $ data [$ this ->Name ] : [];
57
52
$ value = [];
58
53
59
54
foreach ($ this ->getKeysAsArray () as $ i => $ k ) {
60
- if (isset ($ data [$ i ])) {
61
- $ value [$ k ] = $ data [$ i ];
55
+ if (isset ($ incoming [$ i ])) {
56
+ $ value [$ k ] = $ incoming [$ i ];
57
+ } else {
58
+ $ value [$ k ] = '' ;
62
59
}
63
60
}
64
61
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ class SubmittedKeyValueFormField extends SubmittedFormField
9
9
{
10
10
private static $ table_name = 'SubmittedKeyValueFormField ' ;
11
11
12
-
13
12
public function getFormattedValue ()
14
13
{
15
14
$ data = json_decode ($ this ->Value , true );
You can’t perform that action at this time.
0 commit comments