Form to Database and back

bowlingmar 30 Nov, 2008
Hi,

Nice tools en website you have here!
I just found ChronoForms and I must say it can help me a lot.
However I have a question:

Let's say I want a form where the user can tick off some points of interest. I know how to save the data in my database. But how can I make sure the next time the same user goes to his form again, he sees his points of interest checked, as he did last time. And how can he update his data in the database?
Thanks!
GreyHead 30 Nov, 2008
Hi bowlingmar,

You need to recognise the user to pre-fill the form. If they are registered and logged in you can do this by checking the Joomla $user object; if you aren't using registration you can set a cookie (not 100% reliable) or you can have them fill in a little pre-form with their email and use that to look up info in your database table.

You'll need to put the code to do this checking at the beginning of the Form HTML then set the values of each field to the values you've retrieved from the database.

The way ChronoFroms v3.0 is set up is will - I think - update the database record if a user changes their info and re-submits.

Bob
This topic is locked and no more replies can be posted.