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