Prevent Form Submission via widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 05:46 AM
Hi
Im using MRVS in a catalog item, however its hidden in the portal as radio buttons is needed instead of editing the row . i have written a widget script for fetching the data. There is a notes field which should be visible when we select no and it should be mandatory. im unable to achieve this rest all is fine
If no button is selected notes is visible and the border is also red but if its empty its not preventing the submission
The html code for notes
<th class="notes-cell" colspan="7">
<div class="slide" id="{{item.asset}}">
<input type="text" required ng-model="item.notes" class="notes-text" ng-change="c.saveNots()" placeholder="{{data.placeholder}}">
</div>
</th>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 06:00 AM
so if no is selected in variable within MRVS then outside variable should be red?
Is notes an outside variable i.e. outside MRVS on catalog form?
please share some details what type of variable is notes? share screenshots.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 06:11 AM
Basically the whole thing is from widget ihave created a table which fetches the value from asset table
tbody ng-repeat="item in data.assets">
<tr>
<th class="icon-cell">
<div>JA</div>
<input type="radio" name="option{{$index}}" id="yes-{{$index}}" value="Ja" ng-click="c.setAction(item)">
<th>
<div>NEJ</div>
<input type="radio" name="option{{$index}}" id="no-{{$index}}" value="Nej" ng-click="c.setnoAction(item)">
once done the values are mapped to MRVS in backend for RITM
the MRVS is not visible in SP