[ic] Changing "required field" formatting from bold to using a trailing asterisk.

Chuck Adams chuck.adams at capstone-tech.com
Wed Jan 19 04:29:20 EST 2005


I found the post referenced below at
http://www.icdevgroup.org/pipermail/interchange-users/2003-April/032922.
html but my Interpolate.pm (Interchange v5.2) looks A LOT different than
the 2003-04-25 version.   Can someone provide guidance in updating
Interpolate.pm and after.cfg to accomplish the same thing in Fedora Core
1/Interchange 5.2?  Any ideas are welcome.
 
Thanks in advance
------
 
<SNIP>
This one gave me a bit of a run-around, but I did finally figure it
out.  If you like the default "bold" fields, then you should be set to
go using the error tag with the "std_label" attribute.

I think it makes the form harder to read with some labels bolded and
others not, so I changed mine.  In etc/after.cfg, I added this line:

Variable MV_ERROR_STD_LABEL <label for="{NAME}" class="error">{LABEL}
<i>(%s)</i></label>[else]<label for="{NAME}">{LABEL}{REQUIRED
<i>*</i>}</label>[/else]


Note the tabs between "Variable" and "MV_ERROR_STD_LABEL" and the
value.  Also, I modified Interpolate.pm a little to add the "{NAME}"
replacement.  The diff for this is:

--- lib/Vend/Interpolate.pm-dist        2003-04-26 13:32:31.000000000
-0500
+++ lib/Vend/Interpolate.pm     2003-04-25 23:31:52.000000000 -0500
@@ -6513,6 +6513,9 @@
                }
                $text =~ s/{LABEL}/$opt->{std_label}/g;
                $text =~ s/{REQUIRED\s+([^}]*)}/$opt->{required} ? $1 :
''/ge;
+        if (defined $opt->{name}) {
+                       $text =~ s/{NAME}/$opt->{name}/g;
+        }
                $err =~ s/\s+$//;
        }
        $text = '' unless defined $text;

<SNIP>
 
	
Capstone Technology
Chuck Adams
President
chuck.adams at capstone-tech.com 
P.O. Box 369
Cedar Park, TX 78630 
tel: 512-343-8891



More information about the interchange-users mailing list