Page 1 of 1
Creating forms
Posted: Tue Jun 16, 2009 3:58 pm
by Schumy
Hi you all, I need some help creating forms to register data in a db table: I tried FormBuilder but it only insert data in a table (CMS_MODULE_FB_RESP_VAL) and does not create tables with specific fields, or I was not able to do that: can someone help me?
p.s. sorry for my english, I'm from Italy.

Re: Creating forms
Posted: Tue Jun 16, 2009 4:27 pm
by NaN
Since every form is completely different from each other Formbuilder cannot create tables with specific fields.
It just stores the data with its field definitions and form ids.
To get the data there is a module Formbrowser.
Could you provide some more info about what you are trying to do?
Why must the form data be stored in a specific table. (how does the table look like)
Maybe you could use Formbuilder, an UDT and the Eventmanager to store the form data in that way you want.
If the combination of Formbuilder, Formbrowser, UDT ect. doesn't fit your needs you might create an own module.
Try the skeleton module or modulemaker.
Re: Creating forms
Posted: Wed Jun 17, 2009 5:55 am
by Schumy
First af all, thanks for your help.
I have to create an application to store some data in a db: name, surname, work, phone, mail and some messages which will be read from another application (not this) as an automatic voicemail, so I have to write these informations in a specific-formatted table with its fields.
maybe (probably) it's more simple to write some php form to store data, but i was wondering if there was something ready to use with a nice layout and I've found cms made simple. Don't know if there are other simple solutions...
Re: Creating forms
Posted: Wed Jun 17, 2009 8:26 am
by Jeff
You are correct you will need to right a simple UDT to store the data in the table for your other program to read.
Re: Creating forms
Posted: Mon Jun 22, 2009 9:53 am
by Schumy
NaN wrote:
Maybe you could use Formbuilder, an UDT and the Eventmanager to store the form data in that way you want.
ajprog wrote:
You are correct you will need to right a simple UDT to store the data in the table for your other program to read.
Thanks.
I've seen formbrowser and it correctly shows me the fields as I want, but it's only a layout of the same table.
UDT= User Data Type or Table?
I can create a table on db, but could you shortly explain me how I can write there?
thank you!

Re: Creating forms
Posted: Mon Jun 22, 2009 10:24 am
by NaN
Schumy wrote:
UDT= User Data Type or Table?

No, UDT = User Defined Tag.
It contains php code.
So you can create a small script that inserts the data from formbuilder into your table.
The formbuilder creates an event if a form is submitted.
The UDT can be subscribed to that event.
This means it will only be executed if a form of formbuilder is submitted.
You also can create the whole form with an UDT.
There is no ready-to-go-solution since you need the data to be stored in a very specific way.
That means you will need some also specific code.
Re: Creating forms
Posted: Wed Jun 24, 2009 8:24 am
by Schumy
thank you very much, I'll try!
