Selaa lähdekoodia

* The value of a Checkbox or Rabiobutton should contain the value it should return if the control is checked. Not the value of the field itself.
* Fixed setting the Checked property

git-svn-id: trunk@8647 -

joost 18 vuotta sitten
vanhempi
commit
80eb344eef
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      packages/fcl-web/src/fpdatasetform.pp

+ 5 - 2
packages/fcl-web/src/fpdatasetform.pp

@@ -481,7 +481,10 @@ end;
 
 function TFormFieldItem.getValue: String;
 begin
-  Result := FField.asstring;
+  if inputType in [fitcheckbox,fitradio] then
+    Result := 'T'
+  else
+    Result := FField.asstring;
   if assigned (FOnGetValue) then
     onGetValue(self,Result);
 end;
@@ -919,7 +922,7 @@ procedure THTMLDatasetFormEditProducer.ControlToTableDef (aControldef : TFormFie
           if aControlDef.inputType in [fitcheckbox,fitradio] then
             begin
             with aControlDef.Field do
-              Checked := asBoolean;
+              Check := asBoolean;
             if assigned (FOnFieldChecked) then
               FOnFieldChecked (aControlDef.Field, check);
             Checked := check;