boo_radley has asked for the wisdom of the Perl Monks concerning the following question:
and, I'd like the "First Name" bit to show up in red if it's blank. I came up with... table({-border=>1}, th ({-colspan=>2},"<H3>Please verify/ correct the info +rmation below."), Tr (td({-align=>'right'},["First Name"]),td({-align=>' +left'},[ textfield(-name=>'user_firstname' ,-default=>$userinfo[0])]) +), ....
where $state is a variable containing an errorlevel from a validation routine. In this case, $state==2 means that the user name was blank. It seems like there could be a multitude of less cumbersome ways to do this -- what's AWTDI?Tr (td({-align=>'right'},[($state==2?"<FONT COLOR=FF0000>":undef)."Fir +st Name".($state==2?"<FONT COLOR=FF0000>":undef)]),td({-align=>'left' +},[ textfield(-name=>'user_firstname' ,-default=>$userinfo[0])])),
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Optional FONT tag
by Blue (Hermit) on Jan 05, 2001 at 00:39 UTC | |
by dws (Chancellor) on Jan 05, 2001 at 07:46 UTC | |
by t'mo (Pilgrim) on Jan 05, 2001 at 01:58 UTC | |
|
Re: Optional FONT tag
by turnstep (Parson) on Jan 05, 2001 at 00:37 UTC | |
|
Re: Optional FONT tag
by c-era (Curate) on Jan 05, 2001 at 00:44 UTC |