I'm testing a form based on the mobile demo.
If I pre-set the text for username, on the click the login button, though the text is visible on screen, the value of dbUsername.Text is empty.
I was on 2.5.0.48 and have tried 2.6.0.60, both the same results, am I missing something?

- Code: Select all
procedure TfrmLoginMobile.btnLoginJQMButtonOptionsEventsVClick(Sender: TObject;
AParams: TStringList);
var
Username: String;
Password: String;
begin
Username := Trim(dbUsername.Text); { <======= dbUsername.Text = '' }
if StringIsEmpty(Username) then
begin
laUsername.Text := '<font color="#FF0000">Email address is required</font>';
laUsername.Visible := True;
end else
if (not ValidEmailAddress(Username)) then
begin
laUsername.Text := '<font color="#FF0000">Email address is invalid</font>';
laUsername.Visible := True;
end else
begin
laUsername.Visible := False;
end;
Password := dbPassword.Text;
if StringIsEmpty(Password) then
begin
laPassword.Text := '<font color="#FF0000">Password is required</font>';
laPassword.Visible := True;
end else
begin
laPassword.Visible := False;
end;
if StringIsEmpty(Username) or StringIsEmpty(Password) then
begin
Exit;
end;
http://www.sfd.co/images/login.zip
Thank you,
Ryszard