- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2023 09:41 AM
Hi all, is it possible to use radio button as a field type with the g_modal.showFields method? This is in a Workspace Client Script in a UI Action, by the way. (Utah)
I've been searching for documentation to see which fields are available, e.g. "textarea", "choice", etc. but I haven't been able to find any.
Thanks,
Jorge
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 06:49 AM
Hi @saisurendra, what's your use case? We were not able to get radio buttons using g_modal.showFields()
Our team ended up forgoing g_modal.showFields() and instead went with a UI Page to build a completely custom modal and used g_modal.showFrame() to render it in our Workspace.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2023 10:37 AM
Hi @jglez1
Yes, it is possible to use a radio button as a field type with the g_modal.showFields.
To use a radio button as a field type, you can define a field configuration object with the necessary properties. Here's an example:
var fieldConfiguration = {
name: 'radio_field',
label: 'Radio Field',
type: 'radio',
choices: [
{
value: 'option1',
label: 'Option 1'
},
{
value: 'option2',
label: 'Option 2'
},
{
value: 'option3',
label: 'Option 3'
}
]
};
g_modal.showFields({
fields: [fieldConfiguration],
onSubmit: function (values) {
// Handle the submitted values
var selectedValue = values.radio_field;
// Do something with the selected value
}
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2023 11:30 AM
Hi @Syed30, thanks for your reply!
I've tried the code snippet you've provided, but the radio buttons aren't appearing on the modal for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 05:46 AM
Hi @jglez1 , Any luck on 'radio button' in g_modal fields, only choice is the option im able to find so far.
Please let me know if you got any other solution.
Thanks,
Surendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 06:49 AM
Hi @saisurendra, what's your use case? We were not able to get radio buttons using g_modal.showFields()
Our team ended up forgoing g_modal.showFields() and instead went with a UI Page to build a completely custom modal and used g_modal.showFrame() to render it in our Workspace.