Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Service Portal Widget's dropdown

Dhruv Chandan
Giga Guru

Hi All,

I'm trying to create a drop-down field with some options in the Service Portal Widget, drop-down is created but i'm not sure as how can i add options to ti.

HTML script:-

<select type="text" id="mySelect" class="dropdown" ng-model="c.data.personalDetail.LevelOfAccess" required><select/>

i want the drop down to look like below, with the default option as   none:-

find_real_file.png

Any help is appreciated on the scrip to add options to the above drop down.

Regards,

Dhruv Chandan

1 ACCEPTED SOLUTION

Justin Abbott
Giga Guru

<select type="text" id="mySelect" class="dropdown" ng-model="c.data.personalDetail.LevelOfAccess" required>


  <option value="none" selected>None</option>


  <option value="admin">Admin</option>


  <option value="user">User</option>


</select>


View solution in original post

14 REPLIES 14

Justin Abbott
Giga Guru

<select type="text" id="mySelect" class="dropdown" ng-model="c.data.personalDetail.LevelOfAccess" required>


  <option value="none" selected>None</option>


  <option value="admin">Admin</option>


  <option value="user">User</option>


</select>


This won't work since he is using angularjs, the "selected" option is based on the ng-model.


Thanks Justin ! it worked


How to access the selected drop-down value in the server script, I have my business logic to be implemented based on the values selected in the DOM.