Dropdown options required in portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 02:19 AM
Hi Team,
We have added popup free text field message in portal - and now we need dropdown field with 3 options instead of free text field.
How to acheive it ?
Thanks,
Sai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 02:31 AM
Hi @thaduri sai
You can try the following script.
<g:ui_choice_input_field id="choice_list_id" name="choice_list_name" label="Select Option">
<option value="">--None--'</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</g:ui_choice_input_field>
Please mark my answer helpful and accept as a solution if it helped 👍✔️
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2024 12:05 AM
@AnveshKumar M , Thanks for your help.
We are return this below CSS in widget - Can you please modify this below script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 07:20 AM
Hi,
Did you find a way to create dropdown field if so can you please share me the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
I know this is an old question, but the answer might be useful to someone. You can call a widget to be displayed inside the modal, using the parameters 'widget' (ID of the widget to be called) and 'widgetInput' (object with values). In the widget, you can create your dropdown menu or any other logic you need.
//Client script
function(spModal) {
var c = this;
c.onWidget = function() {
spModal.open({
title: 'title',
widget: 'widget-cool-clock',
widgetInput: {'variable1': 'value1', 'variable2': 'value2'}
}).then(function(){
console.log('widget dismissed');
})
}
}
https://www.servicenow.com/docs/r/api-reference/SPModal-API.html
