Dynamic Form creation using php/jquey and saving it some how

Hi all its been awhile since i have posted on site point i have an question re dynamic form creation using php

i have a project i am working on where i have 2 pages

1 page is where i create the form and upon saving it saves the html code in the database

however on page 2 i want my php script to retrieve the form from the database when it is fully loaded display it on the page the html form in browser then when it has loaded allow user to enter data into that form and send that data into the database into a seperate table

what i am guessing is maybe have 2 tables in my db one for holding the forms and one for holding the form data provided by the user?

is there somthing like this be done before or is this hard to do?

Just trying to understand it. You are creating forms, presumably using a page with a form, is that right?
So when you submit your form creation form, you would already have a table for storing actual forms, so you add a row of data to that for the new form. But also you would at that time create a new table to hold the data from the new form.
You would have a table that contains the forms, then a separate table for each form created.

I’m usually not a fan of storing serialized data, but I think for something like this I’d prefer a table of acceptable tags rather than storing actual HTML code.

This is the type of thing Drupal is based on. Adding an infinite number of fields to content without any programming. Which is one reason why it is so powerful. Drupal doesn’t serialze field values. Instead a separate table is used for each one which has a considerable number of advantages over serialization and entity-attribute-value pattern typical associated with meta relational schemes.

Interesting, I’ll have to dig through Drupal’s code.

I could imagineer some type of 1 = text input, 2 = radio, 3 = checkbox schema but was thinking the only way to store the “instructions” for a form would be something like
{1 : "first name", 1 : "last name", 2 : "yes", 2 : "no", 3 : "subscribe"}

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.