Thanks for the suggestion. I don't need to create the form programmatically - the factory is great for that. I've already got code to create the form but want to create a dummy row on the server side to populate a display example form.
Cheers, David On Sat, 13 Feb 2021, 08:37 Jacinto Parga, <jpar...@gmail.com> wrote: > > http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-factory > > El viernes, 12 de febrero de 2021 a las 18:26:42 UTC+1, david...@gmail.com > escribió: > >> I have a controller that displays confidential data from a table but want >> to be able to show the form publicly with some dummy data. The controller >> makes use of field representation and references so I basically need a Row. >> >> I can create the object I need using the table.insert() methods and then >> db.rollback() to avoid committing the dummy data but is there a better >> method. I've had a look at the internals of Row and suspect that trying to >> create a Row object by hand would be pretty fraught, but is there a better >> way than just using insert() and rollback()? It feels like using a >> sledgehammer to crack a nut. >> >> Cheers, >> David >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/FSHPxYTxr24/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/5ce7ca44-d5d7-4854-96c9-99b78b14fcdcn%40googlegroups.com > <https://groups.google.com/d/msgid/web2py/5ce7ca44-d5d7-4854-96c9-99b78b14fcdcn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CAJnoBj60Cus76nmCUyUh9dVQAdwdh4VMOsoedEyZ%3Dv3Maa3Ofw%40mail.gmail.com.