I'm trying to figure out if this is possible or not...
The plan:
A user fills out a form (only registered). It saves to the DB. When the user logs back in and goes to the page with the form, it populates the fields with the form data from the previous time they were there.
I have the registered part and the db part down. I just want to know if it would be possible and if so.. where should I look in the docs? I tried to use the variables for the email in the docs but it didnt work :-D
Also.. can you make me some pizza? I get hungry everytime I come here!! :-)
When the user logs back in and goes to the page with the form, it populates the fields with the form data from the previous time they were there.
not sure I understand, but here is my take:
form is only shown (via PHP in the theme template file) for logged in users
fields are being prepopulated with the data from the last submission?
if so, you need to first retrieve the data from the DB
then feed it into a custom, dynamic form (on the fly setup)
otherwise, field input can also be saved by browsers
Alternative: you can of course modify the handling of the check_default_vars() in lib_aux.php and extend by your own fields e.g. {CW_field1} would have to be resolved by the above function by retrieving the data from the DB and returning this value.
Then you could simply use in your form field config string: field1|{CW_field1}
Future: I'm planning on adding two more filters to my-functions.php:
(a) pre rendering filter (to fill in default data from anywhere)
(b) pre validation filter (to influence field validation)
Also.. can you make me some pizza? I get hungry everytime I come here!! :-)
This is still the most amazing and comprehensive plugin I've found for any type of cms/blog/cart and am eternally thankful for it. Plus I love the fact your respond to every post.
The second option is more what I am going for. So if I wanted to take the users City, would I add something like:
where the ->City would be the field name I entered in cforms. Sorry my coding is rusty. I'm usually skinning systems :-D
I have browsed though some of the recipes! It does look yummy. I just surprised my family a couple weeks ago by making a really good artichoke dip. They couldn't believe that *I* made it!