Re: Dynamic form creation

2006-03-10 Thread Matt Robertson
I did something rather similar to what Casey did in my CMPro CMS.  User 
is presented with an interface and can build their form using it instead 
of coding.

Main table holds form description data (form type, page form is tied to, 
whether form is secure, pass/fail values if its a test-type form)

Child of main table holds form field data in individual records.  Field 
type, length, maxlength, results encrypted or not, selected/checked or 
not, default value, field alias (allows plugging in custom code when 
processing results) etc.

Child of form field table holds form field options.  This is for a radio 
button group, or a drop-down list.

Child of the main table holds the submitted form data for later review 
within the system.

Doing this sort of thing is quite a complex process.  You don't see too 
many code-free form builders due to the sheer amount of legwork it takes 
to make the things, I think.

Hope this helps,

--
mattRobertson
Janitor, MSB Web Systems
http://mysecretbase.com


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235055
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Dynamic form creation

2006-03-08 Thread Andy Matthews
Thanks for this response Casey...

This might be a little more than I want to get into. The form creation would
only be used in the CMS. So I'm okay hard-coding SOME of the information
into each page.

I'm far from creating each page completely dynamically. Each module requires
a moderate amount of coding to make it work properly and I'm okay with that
for the time being. I'm just working slowly towards the future that you laid
out below.

:)



-Original Message-
From: Casey Dougall [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 07, 2006 5:00 PM
To: CF-Talk
Subject: Re: Dynamic form creation


Hi Andy,

yeah we bought this up a few days ago with a survey... Which of course
is a form.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234617
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dynamic form creation

2006-03-07 Thread Casey Dougall
Hi Andy,

yeah we bought this up a few days ago with a survey... Which of course
is a form.

SurveyForm
SurveyField
SurveySelectOptions
SurveyFormAnswer

SurveyForm holds the fields that are unique to each form...
FormID
Title
Description
IsActive
SeedList (Use a comma between addresses.)

~~
SurveyField - Holds the information about individual questions -
Except Select Boxes are slightly different. I'll get to that in a
moment.

FieldID
SurveyID
Question
Type - Text Area, Text Field, Select box
SortOrder
IsRequired
Validation
ValMessage

~
SurveyFormAnswer
AnswerID
SurveyID
Status - Like Pending till someone reviews the data of the form.
DateEntered

~~~

SurveySelectOptions
SelectID
FieldID - Linking back to those surveyFields which have Type=Select
Title
SortOrder

That's about it... Well You'll notice I didn't bring up "Check boxes"
I haven't gone there yet but it might have it's use. I guess that data
could sit in the SelectOptions table... , just need to loop though the
boxes upon submit of the form to get all of the answers inserted.

Of course deleting forms and or questions could have their negative
effects on the data but you could put another column in the tables for
ISDeleted and if a person wants to delete a form or a question it
would just mark the question deleted and leave the record in-tack

Casey Dougall

On 3/7/06, Andy Matthews <[EMAIL PROTECTED]> wrote:
> I have a custom CMS that I use for most all of my clients. With each
> iteration, I take a chance to add extra bits of code and improvements. The
> aim is to cut down the amount of time needed to build out for each client.
>
> One of the things that has been on my list for a LONG time is dynamic form
> element creation. Passing in a few values (field name, labels, whether the
> field is required, etc) and have the corresponding code generated for me.
> This would reduce the amount of code on the actual template page, splitting
> it out to CFCs or custom tags.
>
> I'm wondering if any of you have done something like this before and might
> care to share your methodolgy. Text and textarea fields would obviously be
> VERY simple, but what about radio buttons? Checkboxes, or even worse, select
> drop-downs?
>
> I'm not asking for code, just ideas.
>
>  andy matthews
> web developer
> ICGLink, Inc.
> [EMAIL PROTECTED]
> 615.370.1530 x737
> --//->
>
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234546
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54