[ic] How to use the [error] tag correctly?

Stefan Hornburg Racke interchange-users@interchange.redhat.com
Fri Oct 12 11:42:00 2001


Steffen Dettmer <steffen@dett.de> writes:

> Hi,
> 
> I've playing with the [error] tag on a checkout page.
> 
> Not surprising, the form is a table with a description and a
> input type text. When I use [error], and a check condidtion is
> violated, the std_label gets printed. But when there is no error,
> there is no label on my Input field. My code:
> 
> <td>
> 	given name
> 	[error name=fname std_label="given name" required=1 show_label=0]
> </td><td>
> 	<INPUT TYPE=text NAME=fname VALUE="[value fname]">
> </td>
> 
> Even with show_label=0 (or no show_label at all) the label (given
> name) gets displayed - on errors. I want at least to have give
> name not twice on error, but I would prefere to have [error] to
> output the label (in normal color) even when there was no error.
> This would be the shortest way to make such forms: labeling all
> just with the [error std_label]. Is this possible?

You can try the formel usertag to write shorter code in such pages.

> 
> Second, [error] displays english messages, i.e. "blank". Is this
> hardcoded in ./lib/Vend/Order.pm or is it possible to change the
> messages (I think my german customers would prefere german
> messages :))?

It isn't. Just add blank and the translation to your locale database.
Or you put the text into the order check definition

koerbchengroesse=required Bitte BH-Größe eingeben

Ciao
        Racke

-- 
Racke happily hacks Interchange and maintains Debian packages like Courier.

For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info@cobolt.net; Phone: 0041-1-3884400)