Yes Alessandro, I do understand the theory of this. 1) I do not want to create a dictionary of values and fill the form with that. I want to take the value from the URL and put it into the form as explained in all my posts above. I pasted my code here. Is anyone able to tell me, based on my code, where I need to add which line(s) of code to make this work?
2) I am really not sure where to put this into my code to make it work. Sorry :( On Friday, July 26, 2013 3:06:22 AM UTC-4, Alessandro Molina wrote: > > On Fri, Jul 26, 2013 at 6:32 AM, Dennis Backhaus < > [email protected] <javascript:>> wrote: > >> Maybe I was not clear enough: >> >> 1) I need the form to be prefilled based on an argument I give to the >> page via the URL. >> >> > Fetch the model from the database inside the controller that displays the > form, create a dictionary of the values (vars() is usually enough) and pass > it to the form. > > >> 2) I want the form to only be accessible if >> PAGE/admin/user?customer_id?=X (X being any existing customer_id) is >> called. If you do not submit ?customer_id=X, I want the page to urge you to >> do it. >> >> > Just add a validator over customer_id to the page that displays the form. > SQLAEntityConverter might be convenient: > https://bitbucket.org/_amol_/tgext.datahelpers#rst-header-validators > > > > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/turbogears. For more options, visit https://groups.google.com/groups/opt_out.

