Hi have a form (login form) that is used as a standard form when first called, and the subsequently as a popup form.
I would like to use a different template when it is a pop up from so I have the following calling code:
LoginPage := TLoginPage.Create(Self);
try
LoginPage.Popup := True;
LoginPage.PopupOpacity := 1;
LoginPage.IsModalPopUp := True; //<<<<< the file name is set in this method, see below
await(TWebForm, LoginPage.Load());
LoginPage.AMessage := AMessage;
lRetval := await(TModalResult, LoginPage.Execute);
finally
LoginPage.Free;
LoginPage := nil;
end;
and the setting is done
procedure TLoginPage.SetIsModalPopUp(const Value: Boolean);
begin
FIsModalPopUp := Value;
if Value then
begin
ElementClassName := 'PopUpForm';
FormFileName := 'LoginAgainForm.html';
end;
end;
but the form still uses the default file. Where should I set this?
thanks