[web2py] Why is first element in IS_IN_SET pull-down always blank?
In a crud form (or other form) where I have a field declared as a string that requires=IS_IN_SET(['A','B','C']), the first item in the automatically-generated pull-down for that enumerated field is a blank. Why is that, if there is no blank in my set, and especially, since a blank setting on that field will fail validation? How to get rid of the first blank entry? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Why is first element in IS_IN_SET pull-down always blank?
On Feb 6, 2010, at 7:53 PM, weheh wrote: > In a crud form (or other form) where I have a field declared as a > string that requires=IS_IN_SET(['A','B','C']), the first item in the > automatically-generated pull-down for that enumerated field is a > blank. > > Why is that, if there is no blank in my set, and especially, since a > blank setting on that field will fail validation? How to get rid of > the first blank entry? Try specifying zero=None in the validator. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.