Change placeholder for SELECT controls

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
Andros
User
Posts: 111

Change placeholder for SELECT controls

Post by Andros »

Hello.
I have a "CustomerID" field with lookup value.
In ADD PAGE the field is shown as SELECT control with CustomerID+CustomerName values in OPTION tags.
Initially the SELECT control has an empty value and shows the placeholder (which is the field caption).
I want the control to have the empty value but showing "ALL CUSTOMERS" to explain that if the user doesn't select any specific customer, the form will process all the customers.
I can change it with some client js code, but I would like to update it at generation time. I tried "placeholder='ALL CUSTOMERS'" in "custom attributes" of Field setup page, but with no luck.
What's the best way to do this?


MichaelG
User
Posts: 1111

Post by MichaelG »

You should be able to override the placeholder in the Row_Rendered server event:

Field.PlaceHolder = "<new placeholder>";


Andros
User
Posts: 111

Post by Andros »

Its'ok! Thank you!


Post Reply