drop down list values put -select- as initial value

Haroon Sheikh asked on October 29, 2019 17:31

i have drop down list which filling from custome table but i want to put -select- as initial value also that when in dropdown not selected any value just showing -select- at that time validation required page cannot save invalid option

Correct Answer

Roman Hutnyk answered on October 30, 2019 08:41

Adjust you SQL that gets options for drop down from custom table to look like this:

select
null as itemId,
'select' as ItemName
union all
select
itemID,
ItemName
from customTbl

and mark the field as required

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.