Thank you Annet

On Saturday, September 19, 2020 at 11:32:08 AM UTC+2 Annet wrote:

> I wonder why the IS_IN_DB() validator doesn't suit your needs.
>
> I have a field day:
>
> Field('day', 'reference cal_day', default=None, required=True, 
> requires=IS_IN_DB(db, 'cal_day.id', '%(id)s %(name)s',  zero='Select a 
> day'), ondelete='RESTRICT', notnull=True, label='Day *'),
>
> Doesn't zero = '*Whats your place of operations?'* do what you want?
>
>
> Annet
> Op vrijdag 18 september 2020 om 12:41:11 UTC+2 schreef 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
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/daf5aff2-062c-40ca-b78f-e5cd3b181046n%40googlegroups.com.

Reply via email to