So I'm using a sequence to allow the user to input qr code data (using a 
scanner). There's a lot of variability in terms of exactly how many rows 
I'll need (enough so I don't want to have a precursor page specifying the 
number, as that would require the user to count items rather than just 
start scanning them.

Initializing the form with X rows is trivial. Assuming the name of my 
sequence node is 'qrcodes', I can just render the form with 
form.render(appstruct={'qrcodes': 
['']*X})

However if I don't know ahead of time how many rows I'll need, the user 
will at some point have to add rows. How do I get one of the behaviours 
below (top-most is most preferred):-

1. As user scans one qrcode and presses 'enter', a new row is automatically 
created. This breaks 'enter-to-submit', but that's okay for this case.

2. When user clicks on 'add new qr code' (the automatic javascript button 
which adds new items to the sequence, add a fixed number of rows (say 5) 
rather than just 1 as is currently the case.

My fallback if none of the above works would probably be to pre-fill about 
50 'empty' rows and just discard what I don't need. That would suck on 
mobile though, having to scroll all the way down, but as usage is primarily 
desktop in this case that won't matter too much.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/aaed5bb0-f5de-48b7-a791-952a3f9a0298%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to