PHP Mysql Creating a Subform

M

Matthew Clubb

Hi,
I need help developing an expanding form
I've decided that a use of PHP, Mysql and Javascript is the best platform
for creating a selection of database interfaces which I'm trying to build
for my company. I had been using Microsoft Access, but obviously this
requires licenses for every machine. BUT.....
I'm look for an easy way of recreating subforms. I'm trying to create a
Purchase Order system and in Access I did this by using a subform (listing
the items on order) on a form (detailing the order information). In this
environment whenever you added a new item into the items section a new set
of dialog boxes woud appear for you to put another item in should you
require it, i.e. you could enter infinite items!
Whilst I've seen scripts that make forms dynamic they seem to wipe the
information already entered onto the form in order to update how many dialog
boxes are displayed.

Any ideas on this one would be greatly appreciated, any similar systems out
there?

Many Thanks
Matthew
 
J

Joakim Braun

Matthew Clubb said:
Hi,
I need help developing an expanding form
I've decided that a use of PHP, Mysql and Javascript is the best platform
for creating a selection of database interfaces which I'm trying to build
for my company. I had been using Microsoft Access, but obviously this
requires licenses for every machine. BUT.....
I'm look for an easy way of recreating subforms. I'm trying to create a
Purchase Order system and in Access I did this by using a subform (listing
the items on order) on a form (detailing the order information). In this
environment whenever you added a new item into the items section a new set
of dialog boxes woud appear for you to put another item in should you
require it, i.e. you could enter infinite items!
Whilst I've seen scripts that make forms dynamic they seem to wipe the
information already entered onto the form in order to update how many dialog
boxes are displayed.

Any ideas on this one would be greatly appreciated, any similar systems out
there?

Dunno what a subform is. But you could have a <select> list wired to a bunch
of form controls. Add and remove things in the <select>, display the
values/options with the controls. This would all be a lot easier if the
options are the same for all items (quantity, colour and shipping, say), but
if you have different options for different type items, you could
dynamically insert/delete form elements as required (with DOM). Or stuff
sets of form controls into <span>s which you hide/show as appropriate. Or
maybe have an iframe system where a form is generated server-side. In any
case, you wouldn't have to display a popup window.

You would perhaps do well to think about a generalized system for generating
forms dynamically server-side based on, for instance, fields in a MySQL
query/database table. That way you don't keep custom-building stuff where
the requirements are really quite similar. A PHP system that auto-generates
HTML forms based on MySQL table structure isn't at all difficult to
implement.

Joakim Braun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top