Well, by default, the list:string field type does get a special Javascript 
widget, though the functionality could probably be improved. After you 
enter an item in the initial text box, hit enter, and a new box should 
appear below it, and so on. There is no way to remove a box once created.

Regardless of the widget, you can apply an email validator to each item in 
a list:string input using IS_LIST_OF(IS_EMAIL()). The only caveat is that 
validation errors will not automatically be displayed on the form, so you 
have to explicitly check for a validation error on that field and implement 
a custom error display.

Anthony

On Monday, July 9, 2012 10:15:34 AM UTC-4, weheh wrote:
>
> This has been an oft-disucssed topic. Just search for "list:string crud" 
> But having just experienced the pain myself, and not easily locating the 
> status of this issue, I felt compelled to ask for myself: 
>
> Shouldn't list:string have a default interactive (jQuery OK) widget that 
> is an expandable/collapsible list of user-input text data that works with 
> crud? Validators like IS_EMAIL() would then have to iterate on list:string. 
> This would be handy for storing entities with multiple emails, for example.
>
> Seems like a gap in web2py's form-input armor and a pretty useful 
> capability, to boot. So what's the latest?
>

Reply via email to