there's a conceptual problem with your question.... either you want to save
a list of HTML helpers or you need to save a full-blown form. Of course you
serializing only the HTML part of the form won't get you form.vars,
form.accepts(), etc etc.
I'm curious though, what and why do you need it?
On Saturday, August 17, 2013 2:33:09 PM UTC+2, step wrote:
>
> And in fact it isn't a true copy because after the mapping the so called
> trs_true_copy has lost all the SQLFORM specific data, like links to
> form.vars, etc. So I don't know of a way to make a true copy, and I'm
> asking for one. Thanks.
>
> On Saturday, August 17, 2013 2:19:39 PM UTC+2, step wrote:
>
>> I discovered one way to make a true copy of some list of HTML helpers. I
>> would like to know if there are other more, web2py / pythonic ways to do
>> it. So for instance:
>>
>> form = SQLFORM.factory()
>> trs = form.elements('<tr>')
>> trs_true_copy = map(lambda x: TAG(x.xml()),trs)
>>
>> which works just fine, though it seems a bit overkill having to serialize
>> and deserialize to make a true copy.
>> TIA
>>
>>
--
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.