Page 1 of 1

Placeholder in lookup field

Posted: 2021-04-20 04:29
by baudwalker
new AppGiniField("last_name")
.placeholder("Last Name");

Works fine for a textbox but what about a lookup field?

Re: Placeholder in lookup field

Posted: 2021-04-20 04:55
by jsetzer
As mentioned in the docs ( https://appgini.bizzworxx.de/products/j ... ceholders/ ) this function applies to <input /> fields, only.

chrome_NAZcf0ykvo.png
chrome_NAZcf0ykvo.png (115.96 KiB) Viewed 2783 times

Anyway, I consider adding this feature on lookups in a future version. Unfortunately I have seen many users struggling with placeholder-option for select2 dropdowns due to several problems. There seems to be a bug in that lib. Finding a hooks-only solution will be even harder because I cannot inject code while to control gets written - only after it has been rendered. So I cannot promise if this will work at all, sorry.

For now I recommend using the helptext (description field in AppGini).

Re: Placeholder in lookup field

Posted: 2021-04-20 23:27
by baudwalker
Opps... I should have read the instructions :(