- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2018 08:52 AM
I have imported a custom table and widget to use appointment scheduling. It has the ability to show Description field that will be placed on the catalog task once submitted. How do i get the description field to be mandatory on the widget within Service Portal.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2018 11:00 AM
I was able to resolve this by using this script
if(c.appntDescription != "") {
c.server.get(obj).then(function(response) {
if (response.data.timeSlotReturn) {
c.timeSlotReturn = JSON.parse(response.data.timeSlotReturn);
if (c.timeSlotReturn.sys_id) {
c.alertSuccess = true;
if (c.setReminder) {
c.setupReminder(c.selectedReminderTime.value.display_value);
}
c.getTimeSlots(selectedDate);
c.appntShortDescription = "";
c.appntDescription = "";
c.appntLocationSysid = "";
c.appntLocation = "";
$rootScope.$broadcast('appointmentCreated', '');
}
}
});
}
else
alert ("Please put in a description");
};

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2018 09:55 PM
Hi,
You can add a required attribute in your HTML template code.
Example : Description : <input type="text" name="description" required>
Usage
The required attribute is a boolean attribute.
When present, it specifies that an input field must be filled out before submitting the form.
Mark If Correct/Helpful.
Regards,
Ajay
www.DXSherpa.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2018 11:00 AM
I was able to resolve this by using this script
if(c.appntDescription != "") {
c.server.get(obj).then(function(response) {
if (response.data.timeSlotReturn) {
c.timeSlotReturn = JSON.parse(response.data.timeSlotReturn);
if (c.timeSlotReturn.sys_id) {
c.alertSuccess = true;
if (c.setReminder) {
c.setupReminder(c.selectedReminderTime.value.display_value);
}
c.getTimeSlots(selectedDate);
c.appntShortDescription = "";
c.appntDescription = "";
c.appntLocationSysid = "";
c.appntLocation = "";
$rootScope.$broadcast('appointmentCreated', '');
}
}
});
}
else
alert ("Please put in a description");
};