[web2py] Re: Setting a default value for a reference field

2020-09-18 Thread Jim S
Reading from this stackoverflow post, it appears it isn't something you can do. But, they show some alternatives: https://stackoverflow.com/questions/5805059/how-do-i-make-a-placeholder-for-a-select-box However, that post is pretty old, maybe someone else has some better solutions. -Jim On

[web2py] Setting a default value for a reference field

2020-09-18 Thread mostwanted
Is there a way to create a placeholder for a reference field? e.g: {{ *Field('place', 'reference locations', label=SPAN('Place of operations'), widget=lambda field, value: SQLFORM.widgets.reference.widget(field, value, _placeholder="Whats your place of operations?"))* }} Regards; Mostwanted -