Re: trying to create a form builder

2006-07-19 Thread John Zimmerman [gmail]
I haven't looked at it too closely lately but WebsiteBaker has a sort of form builder that might be helpful in answering some design questions.It is nothing fancy but it lets you define as many fields as you want.
On 7/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Any progress on this? I am facing the same problem.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: trying to create a form builder

2006-07-19 Thread [EMAIL PROTECTED]

Any progress on this? I am facing the same problem.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: trying to create a form builder

2006-06-23 Thread sicapitan

Hi

how did you go with this?  Im after a simple ajax form builder in the
coming weeks and wouldnt mind expanding on what you have done.

Cheers
sicapitan


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: trying to create a form builder

2006-06-15 Thread huy





cammo,

I have built such a form builder application for my real job(with 
Cake!). It does not have a pretty UI like the commercial form builders:

  http://www.jotform.com/index
  http://wufoo.com
  http://www.formassembly.com/form-builder.php

but it works decently with a simple non-ajax creation form.

What I did was have a formelements table that held single form input
elements that have a many-to-many with a forms table. 
So a form is made up of one or more formelements and formelements can
be reused for many form definitions. 

I have another table called submittedforms that has relationship with
the forms table. Each submitted form has many
records in a table called submittedvalues which also has a FK to the
formelements table.

The formelements table has records with a field to hold the type of
form (text, input, radio, select, checkbox, hidden etc).

Thus the submittedvalues table would hold all the collected data for
each element on the form and relate it back to the "reusable"
formelements.

The only disadvantage of this approach is that all data collected from
the form will end up being stored individually in Char(254) fields.

This is not optimal but one optimization strategy is to have multiple
submittedvalue type tables with fields that are
appropriately typed and sized for the type of data collected for each
type of formelement.

For instance you could have a submittedvalues_radio which would have a
field that held an integer/binary perhaps instead of 
a generic 254 Character field. This table would hold all submitted
values for formelements of a type radio.

Thus a complete form will have many submissions, each submission is a
collection of data for each formelement that makes up 
the form and thus pieces of data are stored individually as a record in
the submittedvalues table.

The other option is to have a submitted values table, that for each
record, will hold All of the form submitted data as a single serialized
array which would be very efficient from a high volume/collection
standpoint. But then it would be hard to do data/statistical analysis 
via sql on concatenated serialized answers.

I apologize if I am unclear but it is hard to explain the DB schema
with words.

If the project is not going to be used by my employer, I will probably
release the code in case it is useful for
anyone. It is my first cake project so there are probably lots of
things that would make people cringe.

I also built it in mind for multiple uses. A generic form building/form
data collection application has many uses including
making polls/surveys, online tests, a trouble
ticket/helpdesk/bugtracking system, project/task tracking system and
probably
much more if I think about it some more.

In my case my employer just wanted to automate a paper based form and
the workflow around that paper form,
 and of course I warped it into something whose subset of features
would handle collecting the data and tracking
the work and status around each submission ( a ticket/task tracking
system ).

It is not clear to see from my attempted schema definition above but to
add status tracking would entail just adding
a field to each submitted form entry that held a status and creating
some UIs to change it. Presto, instant ticket/bug/task tracking
system.

In the case of a poll/survey, just some UIs to summarize the submitted
values records by formelement and you can
show some statistics.

In the case of an online test, another table would probably hold
records with correct answers for each formelement and then a 
simple comparison with the submitted values table could calculate
whether or not data submitted is correct.

So from my basic form creation/form submission application, it can
easily be extended to a broader range of
applications.

Huy

cammo wrote:

  Hi There,
I am trying to create a form builder in cakephp where multiple clients
can log in and create a form/survey and get the results of that survey.
 The problem I am having is that if each client creates a form with 10
custom fields I will need to have a seperate database table for each
form that is generated and also a table for each form to hold the
results.

Does anybody know of a better way to do this and/or if there are any
good tutorials, in cakephp or not on creating multiuser applications?

Any Help would be greatly appreciated.




  


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---





Re: trying to create a form builder

2006-06-15 Thread cammo

Actually I found an open source application and looked at how they did
it, and I think I will try to adapt that it was more a database design
for me and trying to get my head around setting up the database in the
best way possible.

Cheers


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: trying to create a form builder

2006-06-15 Thread cammo

Thanks very much for your help Grant,
Not sure if that is exactly what I am after though,
Basically I want to allow multiple clients to have multiple forms in
the one app and to not have to create a new database to store each form
and also another to store the results for each one. I can see where
your method would be good, you could save the form in binary form and
store different forms in the one database. The only thing I think would
be a problem is when it comes to retrieving the stored data from the
database, wouldn't it be time consuming and/or rather messy to have to
decode each database record and then perform an operation on it to use
for reports etc...

I have a play around with it and see if I can adapt it to my needs.

Thanks again for you help It is much appreciated


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: trying to create a form builder

2006-06-15 Thread Grant Cox

What I have used (but not quite for what you are doing) is to override
the beforeSave() and afterFind() functions to be able to save binary
data (arrays of information).  I think this should work ok for what you
want, as long as you aren't relying on other model functions that
directly look at the database (ie getColumnTypes(), hasField() ).

But the standard form controls (ie prepopulation, validation) just look
at the Model object after it is loaded, so you should have no problems
saving the field information as an array.

Just in case this is what you are after, I have put a paste of what I
currently use, to encode model data before being saved in the DB, and
decode when loaded.
http://www.cakephp.org/pastes/show/56c6f37eea4cba616418c649ee2eb84e


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



trying to create a form builder

2006-06-15 Thread cammo

Hi There,
I am trying to create a form builder in cakephp where multiple clients
can log in and create a form/survey and get the results of that survey.
 The problem I am having is that if each client creates a form with 10
custom fields I will need to have a seperate database table for each
form that is generated and also a table for each form to hold the
results.

Does anybody know of a better way to do this and/or if there are any
good tutorials, in cakephp or not on creating multiuser applications?

Any Help would be greatly appreciated.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---