in reply to How to display only certain fields during dynamic HTML generation?
I would like to control which fields are displayed to the user upon display of the success_page.
This is a problem that templates are ideally suited to handle. Using HTML::Template, for example, a template to handle static {name, value} pairs might look something like
<TMPL_IF foo>foo: <TMPL_VAR foo ESCAPE=HTML><br /></TMPL_IF>
It's only slightly more complicated to handle dynamic {name, value} pairs.
<TMPL_LOOP vars> <TMPL_IF value><TMPL_VAR name ESCAPE=HTML>: <TMPL_VAR value ESCAPE=HTML><br /></TMPL_VAR> </TMPL_LOOP>
A Super Search for "HTML::Template" will turn up lots of examples to show how to set this up in code.
|
|---|