Hello,

I'm thinking about implementing a form for ordering parts, and before 
starting this work I'd like to have some advice.  Here is the base 
functionality wanted:

- The form would include multiple similar lines made of 3 fields, to hold a 
"part_reference", a "part_description" and a "quantity".

- A simple implementation would prepare a basic form with a fixed number of 
lines, say 5, and the user would fill only the lines that he would need. 
But it would be nicer to have an "add part/line to order" button that would 
add a line to the form. And also a "remove part/line from order" button for 
each individual  part/line.

- The user could be assisted in entering the  "part_reference" value by an 
autocomplete/suggest functionality that would query my "parts" database, 
but it would be possible to enter a reference not in the db. When a 
reference entered is found in the db, the "part_description" field would be 
automatically populated with the associated information coming from the db. 
(The description could be shown during the autocompletion/suggest process, 
also). The description could be made editable, as this is useful in the 
case the part is not found in the DB.
The autocomplete/suggest feature can either be a special dedicated utility 
e.g. above the form, or this could be integrated in each individual 
"part_reference" input field.

- The "quantity" field could be enhanced with a clickable +/- quantity 
incrementer/decrementer

- Once the user clicks the button "submit", the form contents would be 
processed by a web2py controller that would loop on each part specified in 
the form (ignoring lines that do not have a part number or whose quantity 
is 1). Only the part_reference and the quantity are used (part_description 
is of no use here). Is there some web2py example of such form processing 
with looping on multiple similar input line?

Well, I'm interested if you have examples and advice (or even ready to use 
code!), snippets of code (jquery/javascript and web2py as well)...

Thanks



-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to