[ic] dynamic profiles.order

Mike Heins interchange-users@interchange.redhat.com
Mon Nov 12 14:36:35 2001


Quoting Patrick J. Walsh (pjwalsh@pacbell.net):
>     I have an interesting problem and have exhausted the archives and the
> docs that I can find.  Hopefully someone here will have a suggestion or
> pointer.
> 
>     Certain software products in our store require that the customer agree
> to a license agreement before purchasing.  Each product that has a license
> generates a checkbox like so:
> 
> <input type="checkbox" value="checked" name="license_[item-code]">
> 
> with a label like so:
> 
> [error name="license_[item-code]" std_label="I have read and agreed..."
> show_label=1 required=1]
> 
>     However, the "required=1" parameter is apparently not enough to force
> the user to check the box before checking out.  This suggests that I need to
> have associated entries in etc/profiles.order.  My problem is this: how do I
> make a dynamic profiles.order that adds the appropriate "required" lines
> depending on which products are being purchased?  Or is there a way to
> require a field without putting an entry into profiles.order?
> 
>     Any pointers appreciated.

There are about 5 zillion ways to do it.

One quick one would be right in the profile:

[item-list]
[if-item-field needs_license]
license_[item-code]=required Need indication you have read and agreed for [item-code].
[/if-item-field]
[/item-list]

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer