If you mean "in the form" in the "right in the HTML" sense, you may need to use something like
Text::Template to put this kind of functionality in there.
If you mean in the context of
CGI, then the idea is simply to output bits of HTML, one after the other. In this case, you're merely printing a part conditionally.