Hi Christian, thanks for your reply!  Your approach sounds interesting and 
it seems to be one of the best options with what's possible as for this 
moment.

I have this page already implemented and working in php/javascript, but I'm 
searching for a new "full featured framework" exactly to avoid these kinds 
of ugly workarounds. I guess I'll either wait until web2py implements this, 
or I guess I'll have to decide between rails or django for this project. 
I'm not a python or ruby programmer (I program mostly in C/Perl/shell and 
php), so it doesn't really matter much to me.

I read all of web2py's documentation and created a few demo projects and I 
enjoyed it very much. I wish I had the programming experience and knowledge 
to help web2py developers to implement this feature, as it seems lots of 
other people also need this (I've found MANY threads from people asking the 
same thing on this mailing list).

Thanks again!

On Tuesday, January 8, 2013 2:17:05 AM UTC-2, howesc wrote:
>
> i have an (untested) idea...plugging together a few things i have used 
> before....
>
>  - you could create templates of field sets using handlebars: 
> http://handlebarsjs.com/  then you can via JS add them to the page based 
> on user interaction.
>  - you can use hidden fields to provide some meta data on the form.
>  - remembering that in your controller you define your SQLFORM *before* 
> you process it, you could check for the presence of your hidden fields in 
> request.vars, and based on their values initialize your SQLFORM to match 
> the sub-forms that were added to the form.  then when you call .process it 
> will check all those fields as well.
>
> i don't know if that is a great idea or not (we recently solved this 
> problem at my workplace but i think ended up using handlebars and manual 
> form processing)....it's a thought we considered and still might try!
>
> christian
>
> On Sunday, January 6, 2013 11:02:01 PM UTC-8, Henrique Pantarotto wrote:
>>
>> Hello everybody!
>>
>> I'm quite new to Python and web2py, but I "consumed" all of web2py's 
>> wonderful documentation at the last few days and I'm quite amazed at this 
>> wonderful framework. But there's a feature that I need that I couldn't find 
>> a way to easily implement it.
>>
>> The application that I'm developing requires extensive use of form 
>> cloning within a single web page, done dynamically at the client side.  I'm 
>> not really sure how to call this "technique", so I found a bit hard to find 
>> information regarding this at this mailing list's archive.
>>
>> What I want to accomplish can be easily understood viewing the 
>> screenshots from this tool: http://www.mdelrosso.com/sheepit/
>>
>> I already have my own (ugly) jquery code to create the forms dynamically, 
>> and of course I could validate it manually on web2py's side, but I was 
>> looking into an easier implementation using something like FORM or SQLFORM. 
>> Like I said, I'm very new to web2py and python, and I have no idea how 
>> django works, but I think I need to accomplish something similar to this: 
>> https://docs.djangoproject.com/en/dev/topics/forms/formsets/
>>
>> I tried searching this mailing list archive and I found a couple of 
>> discussions from people trying to do the same thing, but I didn't find a 
>> solution.
>>
>> https://groups.google.com/forum/#!topic/web2py/ssaSj6v9Wu8/discussion
>> https://groups.google.com/d/topic/web2py/UK8NZ1VMlNk/discussion
>>
>> But these are threads from 2011....
>>
>> There's also this guy asking something similar a couple of months ago: 
>> https://groups.google.com/d/topic/web2py/IPMz4FylT2k/discussion and 
>> http://stackoverflow.com/questions/13215902/web2py-possible-to-submit-multiple-forms-with-a-single-submit-button/13215926#13215926but
>>  the solution presented didn't seem very elegant.
>>
>> Anyway, I would really appreciate any help on this.
>>
>>
>> Thanks, Henrique.
>>
>>

-- 



Reply via email to