[ic] &and + require in profile.order, how ?
Kevin Walsh
kevin at cursor.biz
Thu Apr 7 04:13:05 EDT 2005
ns [linux at post10.tele.dk] wrote:
> Kevin Walsh wrote:
> > You probably want something like the following:
> >
> > [error name=fname std_label="Name" required=1]
> > <input tag for the fname form field>
> > <input tag for the lname form field>
> >
> > And then the following in your profile:
> >
> > &and fname=required, lname=required Anonymity is overrated
> >
> > Remember to restart/reconfig after changing the profiles.order file.
> >
> That was also what I did think, but I don't get an 'error' when lname is
> empty. (And I did just try again, just to be shure. Only when fname is
> empty I get an error...) ((and I didn't pres a space or like in the lname
> field))
>
Ok - try this instead. In your profile:
[if type=explicit compare=`
return 1 unless length($CGI->{fname});
return 1 unless length($CGI->{lname});
return 0;
`]
name_label=required Ask one of your parents for a hint
[/if]
On your form:
[error name=name_label std_label="Name" required=1]
<input tag for the fname form field>
<input tag for the lname form field>
Note that the compare=`...` uses backticks - not single quotes.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin at cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/
More information about the interchange-users
mailing list