Dinamically adding form field to a form
Hi all,
I know that the subject of this message is very common, but what I would get is this:
in my database I have this table
- CREATE TABLE parameters (
- parameters_id serial,
- object_id INTEGER NOT NULL DEFAULT 0,
- label VARCHAR (50) NOT NULL DEFAULT '',
- value VARCHAR (50) NOT NULL DEFAULT ''
- );
object_id is related to another table with value: car
- INSERT INTO parameters (1, 'color', 'red');
- INSERT INTO parameters (1, 'wheels', '5');
- INSERT INTO parameters (1, 'speed', 'fast');
I need to create a form that allows me to add fields on the fly based on how many fields I need and then save them in the table as if they were respectively the label and value.
Example
Label: color, Value: red
In your opinion, what is the best way or plugin to do this?
Any help, links, suggestions, plugins or anything else that may help is welcome.