Re: [PHP-DB] Generating forms and form elements

Re: [PHP-DB] Generating forms and form elements

am 20.06.2006 22:04:36 von Mark Fellowes

------=_EDNP_0000_79d1d9ba-1828-4b8a-b939-87db65c4f99a
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

 Micah, Thanks for the reply. I didn't see it earlier. Also=
my apologies for the vagueness but right now things are somewhat vauge.=
=0ALet me try and explain better: To start I'll paint a visual=
to explain it better. Ultimately I know this will require additional=
tables (will get to that in a moment) When the page loads, there=
is going to be a "palette" area where form fields of various types will=
be sitting. They will not be in a form. The form will sit in another=
part of the page in it's own div. So to start the table all that shoul=
d be generated into that palette area will be the form elements (selects=
, checkboxes, radio buttons, etc). I'm thinking php will be used to pul=
l the markup out of the table and into the palette. Users can dra=
g and drop form elements into the form. They can edit the elements in=
there (i.e. length of field, label name, required field, etc). At that=
point the chosen elements (the ones now in the form) should be pumped=
back into another table where a name column will save the form intact=
with all it's elements. Hope this gives a better idea of what I"m=
trying to acheive.=0AMark -----Original Message-----=0AFrom: micah=
@raincross-tech.com=0ASent: Tuesday, June 20, 2006 4:01 PM -07:00=0ATo:=
Mark Fellowes [Zanoni@goowy.com]=0ASubject: [PHP-DB] Generating forms=
and form elements =0AHi Mark, That's pretty vague, there's probabl=
y 1000 ways to do this. Are you just =0Aintending to store the HTML in=
a text field, or generate the form fields =0Abased on data so that the=
user can edit the data? Are you storing just =0Adata in the database,=
or the form structure? Also if it's structure, do =0Ayou intend on stor=
ing formatting information, or just the form fields =0Athemselves. =
If you sit down and draw up a detailed non-code plan, the solution would=
=0Alikely present itself. -Micah=0A
------=_EDNP_0000_79d1d9ba-1828-4b8a-b939-87db65c4f99a--

Re: Generating forms and form elements

am 20.06.2006 23:29:21 von Micah Stevens

--------------080109090006000305050109
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit


Hi Mark,

No problem!

There as always are many ways to accomplish this, and this sounds like
this will be largely an exercise in Javascript, but on the PHP/SQL side
you'll just need to design a table where rows correspond to information
that pertains to the whole form (username or ID, title, stuff like that)
and then a second table that corresponds to form fields for the form,
and are linked via an ID field. I do a similar thing for some shopping
cart software that allows the administrator to build custom forms to
collect information for particular items for sale. It works pretty well.
Is there something in particular you're struggling with or does this help?

The hard part I think will be associating the javascript drag/drop
events with information storage in the database. This to me would work
well with a small javascript routine that will upon dropping call
XMLRequest to a server side script that will update the table
immediatly. Then you don't have to mess with some grotesque hidden form
madness to keep track of what the user wants.

-Micah


Mark Fellowes wrote:
>
>
> Micah, Thanks for the reply. I didn't see it earlier. Also my
> apologies for the vagueness but right now things are somewhat vauge.
>
> Let me try and explain better:
>
>
> To start I'll paint a visual to explain it better. Ultimately I know
> this will require additional tables (will get to that in a moment)
>
>
> When the page loads, there is going to be a "palette" area where form
> fields of various types will be sitting. They will not be in a form.
> The form will sit in another part of the page in it's own div. So to
> start the table all that should be generated into that palette area
> will be the form elements (selects, checkboxes, radio buttons, etc).
> I'm thinking php will be used to pull the markup out of the table and
> into the palette.
>
>
> Users can drag and drop form elements into the form. They can edit the
> elements in there (i.e. length of field, label name, required field,
> etc). At that point the chosen elements (the ones now in the form)
> should be pumped back into another table where a name column will save
> the form intact with all it's elements.
>
>
> Hope this gives a better idea of what I"m trying to acheive.
>
> Mark
>
>
> -----Original Message-----
>
> From: micah@raincross-tech.com
>
> Sent: Tuesday, June 20, 2006 4:01 PM -07:00
>
> To: Mark Fellowes [Zanoni@goowy.com]
>
> Subject: [PHP-DB] Generating forms and form elements
>
> Hi Mark,
>
>
> That's pretty vague, there's probably 1000 ways to do this. Are you just
>
> intending to store the HTML in a text field, or generate the form fields
>
> based on data so that the user can edit the data? Are you storing just
>
> data in the database, or the form structure? Also if it's structure, do
>
> you intend on storing formatting information, or just the form fields
>
> themselves.
>
>
> If you sit down and draw up a detailed non-code plan, the solution would
>
> likely present itself.
>
>
> -Micah
>
> !DSPAM:4498548e259778165356420!


--------------080109090006000305050109--

Re: Generating forms and form elements

am 14.08.2006 01:00:03 von Gerr D

Mark,

I am just catching up on mail, so you may have solved this already.

I came across AIOCP the other day (
http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=aio cp ) and
they store php code snippets in the database. You need to run the
install and have it create the database so you can start snooping
around. I am not sure I will use it, but there is lots to learn...

Gerry

On 6/20/06, Mark Fellowes wrote:
>
> Micah, Thanks for the reply. I didn't see it earlier. Also my apologies for the vagueness but right now things are somewhat vauge.
> Let me try and explain better:
>
> To start I'll paint a visual to explain it better. Ultimately I know this will require additional tables (will get to that in a moment)
>
> When the page loads, there is going to be a "palette" area where form fields of various types will be sitting. They will not be in a form. The form will sit in another part of the page in it's own div. So to start the table all that should be generated into that palette area will be the form elements (selects, checkboxes, radio buttons, etc). I'm thinking php will be used to pull the markup out of the table and into the palette.
>
> Users can drag and drop form elements into the form. They can edit the elements in there (i.e. length of field, label name, required field, etc). At that point the chosen elements (the ones now in the form) should be pumped back into another table where a name column will save the form intact with all it's elements.
>
> Hope this gives a better idea of what I"m trying to acheive.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php