> > In my table definitions I do use comments to give directives, however, > this is a custom form on a landing page, and I think labels and comments in > this case make the form look ugly, so I use placeholders to replace the > labels and comments. For a select this doesn't work: > > form.element('select[name=navID]').update(_placeholder='Select 4 > functions') >
Guess so... placeholder isn't something you can use on a select.....only on a input. > > Therefore, I was looking for a way to achieve the same using the zero > option. This doesn't work: > > form.element('select[name=navID]').append(0,"Select 4 functions") > > TypeError: append() takes exactly 2 arguments (3 given) > > > But the solution Richard first provided (which for whatever reason, I did > not give a try first, sorry) > does work. > > Why doesn't append work and why does insert? > > > That's how lists work in python. Either you append(something) meaning you want "something" at the end of the list or you insert(in_what_position, something) . -- --- 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.