Creating a dynamic form and referring to a page with dynamic parameters

I want to create a form where a visitor can dynamically add more
fields to it. The visitor will input a list of stuff and can be
anywere from 1 to over ten. The user will be inputting name of a
medication and then dosing. Then, when the user submit the form i want
to be able to refer the user to a page with all of the inputs
entereted parameterized so that the user can just save the link. so,
the referring page can have one item parameterized or multiple. Each
item the user adds will contain three attributes like dose and how
often they take it.

i hope that is clear…

thanks

2009/6/4 tashfeen.ekram [email protected]:

I would suggest thinking about what data you want in the database
first and what the relationships are. Possibly you need a user table,
a medications table and a user_medications table, with a habtm
relationship between medications and users. The user_medications
table being the join table and also containing the dosage data.

Then the views you require are various slices through the data.

Does that help to get you started?

Colin

i wanted to allow this feature to be available to users who are not
logged in.
the form is to basically allow users to put in several drugs of
interest with some other info and get back an analysis of informatino
eneterd. i do not need to save it in my db for future reference. but
perhaps the user wants to see the same analysis again and could just
save the link.

yes, that is correct. i would like to be able to stroe the info in the
url

2009/6/5 tashfeen.ekram [email protected]:

yes, that is correct. i would like to be able to stroe the info in the
url

I don’t think that is the way I would do it, I would use the database.
You could do without the user table but keep the other data. Purging
old data from the db occasionally if necessary. I am not sure how to
go about it using the url. I can see how to use the url to generate
the pages but I do not see immediately how to use the user input to
generate the url.

Colin

2009/6/4 tashfeen.ekram [email protected]:

i wanted to allow this feature to be available to users who are not
logged in.
the form is to basically allow users to put in several drugs of
interest with some other info and get back an analysis of informatino
eneterd. i do not need to save it in my db for future reference. but
perhaps the user wants to see the same analysis again and could just
save the link.

If you want the user to be able see the same analysis again then you
must store the data somewhere. Or are you suggesting putting all the
data on medications and dosage in the url as parameters?

Colin