I'm getting lost in templates

How are templates meant to work?

Are items in the head of a form template meant to merged into the head of the page?
What about the body tag in the form template?
Should I effectively just have the body content?

Also, I have the following code:

procedure THomePage.WebButton1Click(Sender: TObject);
Var
  lLoginForm: TLoginForm;
begin
  lLoginForm := TLoginForm.Create(Self);
  lLoginForm.Popup := False;
  await(TLoginForm, lLoginForm.Load());
  try
    await(TModalResult, lLoginform.Execute);
  finally
    lLoginForm.Free;
  end;
end;

This displays the form full screen, but when I inspect it the content of the calling page is still there, though not visible.

Thanks

  1. HTML elements that are supposed to be linked to controls are expected to be in the HTML BODY section

  2. When Popup = false, it will take the entire browser window size and overlap the form from where it is called

Thanks, understand now.

So should the templates be

<html>
<head>
</head>
<body>
content <tag id="xyz">
</body>
</html>

or

<body>
content <tag id="xyz">
</body>

or just

content <tag id="xyz">

or doesn't it matter

In HTML form file templates, it does not matter. You can leave the HTML/HEAD off.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.