Hi!
1. it is not quite clear for me, what is the goal of client/property
fields? Are they search fields?
2. If you want user to fill/edit/del all these fields (without server
interaction) and submit result at once - it's impossible without having
some JS-coding
3. Your Bulkdata looks like grid, so you can use SQLFORM.grid, but it
requires real DB-table and performs submission per record add/edit/del,
i.e. all user actions will be submitted immediately, so, special submit
button is useless.
But still it's possible to be realized by web2py power only! (w/o JS-coding)
What you have to do:
1. Create dummy table to process bulkdata add/edit/del, it should have
extra field "user_id" - reference to auth_user.id (we don't want user to
see what another one is doing )
2. Create 2 controllers - one to process main page and final
user submission ( now, submit-button is useful;) ), another - to process
bulkdata only (returning something
like SQLFORM.grid(dummy_table.user_id==auth.user_id) ).
3. Embed bulkdata_controller to main_page_controller using smth like
=LOAD('bulkdata_controller', ajax=True) - see the book
4. When user performs final submission - do what you want to do using
dummy-table data filtering by auth.user_id, then delete bulckdata records
(using filtering by auth.user_id of course)
There is an issue - is it possible dummy-table id overflow?
To avoid this you can use 'big-id' type for id-field and perform
periodical (Sunday night or 31 October ) truncation all dummy-table records
with restart id-counter (or just recreate table)
On Wednesday, March 9, 2016 at 7:12:14 PM UTC+3, Yoel Baez wrote:
>
>
> I need to do something like this in web2py... please help me..
>
> Regards,
> Yoel
>
>
>
> <https://lh3.googleusercontent.com/-7Oqq6T6rt6A/VuBKsvdnG6I/AAAAAAAADfY/IoEOi6yLljY/s1600/ejemplo2.PNG>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.