For example, I have a list models table and build a dropdown list from it but I want dropdown show something like "SELECT Model", then pick the model. I don't want to register the "SELECT Model" record in table. What's the easiest and clean way to do? I have 5 drop down list so ideally when I change the first dropdown, other 4 should show "SELECT ...." on the dropdown's default.
*my controller* models = db().select(db.KR_Model.ALL) *my view* <td><select name='model_name'> {{for model in models:}} <option value="{{=model.Name}}" {{=" selected='selected'" if model.Name==request.vars.model_name else ""}}> {{=model.Name}} </option> {{pass}} </select></td> -- 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/d/optout.