From d6b04579018faf787274546942ca1022ca05befa Mon Sep 17 00:00:00 2001 From: Rod Roark Date: Mon, 12 Jan 2015 10:35:15 -0800 Subject: [PATCH] Fix to clear LBF form data that is not returned by the form but is defined in its layout. This matters for fields conditionally disabled by a plug-in. --- interface/forms/LBF/new.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/interface/forms/LBF/new.php b/interface/forms/LBF/new.php index 42e69f54d..e4043d92a 100644 --- a/interface/forms/LBF/new.php +++ b/interface/forms/LBF/new.php @@ -131,7 +131,15 @@ if ($_POST['bn_save']) { $data_type = $frow['data_type']; // If the field was not in the web form, skip it. // Except if it's checkboxes, if unchecked they are not returned. - if ($data_type != 21 && !isset($_POST["form_$field_id"])) continue; + // + // if ($data_type != 21 && !isset($_POST["form_$field_id"])) continue; + // + // The above statement commented out 2015-01-12 because a LBF plugin might conditionally + // disable a field that is not applicable, and we need the ability to clear out the old + // garbage in there so it does not show up in the "report" view of the data. So we will + // trust that it's OK to clear any field that is defined in the layout but not returned + // by the form. + // $value = get_layout_form_value($frow); // If edit option P or Q, save to the appropriate different table and skip the rest. $source = $frow['source']; -- 2.11.4.GIT