we have a param_tableName file for each table that switches on the value edit (1|0). 0 it loads null or your preferred default values and 1 it loads from your select query. I tweaked an existing sql builder script so the param files can be auto-generated in a couple seconds. I've never thought of this as elegant, but it has worked extremely well for us. bonus is the param files have be repurposed.
 
-mike
-----Original Message-----
From: Lee Borkman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 23, 2002 2:27 AM
To: [EMAIL PROTECTED]
Subject: Re: form re-use

Hi Kay,
 
It's been a pretty vexed issue within Fusebox for a while.  Many of us used Steve's CF_ReuseForm tag, but it was always a little strange, although the concept was great.  Patrick went with a set of CFPARAM statements, etc, etc.
 
I think that the best method around now is to write your form so that expects to have values for each field.  Then for a form of "new" data, simply run CF_QuerySim to create an empty recordset with the appropriate columns, etc, and you can use the same form fuse without any changes.  I won't use the word "elegant" because that's something of a four-letter word around here, but it's quite pretty anyway.
 
I have also seen Hal use a SQL select with a false condition in the WHERE clause to return an empty recordset.  That is pretty cute too.  Anyway, I'd go with CF_QuerySim.  That tag has many other uses, so why not get used to it? ;-)
 
Have fun,
LeeBB

----- Original Message -----


 
Hi all,

Over my last couple of projects, I have tried a couple of different ways
to resuse forms (ie a single fuseaction for add or edit product, for
example). I'm not really happy with any of them. Now I'm about to start
a new large project, and I want it to be the bestest ever :) Does anyone
have any *really elegant* methods for reusing forms that they would like
to share?

Kay.

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================

Reply via email to