I have created a Custom app for new ticket Page. In the app there are few text fields. I need to make these fields required to create a ticket.
I have checked the possibility to do below methods. But couldn’t found any document on it.
stop submitting form until user fill required fields in custom app.
disable submit button until required fields fill.
Pls provide me any possible way to do this.
I have tried itemChanged but it does not fire when I click submit. what is the correct one event for this.
I just used the same code in the doc.
var propertyChangeCallback = function (event)
// code to be executed when the type of the ticket is changed.
{
var event_data = event.helper.getData();
console.log(event.type + " changed from " + event_data.old + " to " + event_data.new);
};
useEffect(() => {
// props.client.interface.trigger ("disableElement", {id: "status"})
// props.client.interface.trigger ("disableElement", {id: "subject"})
// props.client.interface.trigger ("disableElement", {id: "requester"})
var propertyChangeCallback = function (event)
// code to be executed when the type of the ticket is changed.
{
var event_data = event.helper.getData();
console.log(event.type + " changed from " + event_data.old + " to " + event_data.new);
};
props.client.events.on("ticket.itemChanged", propertyChangeCallback);
})
But when I hit submit it never trigger the callback event.
@Nayana_Priyankara I assume that you have added some fields via your App and you want to make that fields mandatory.
I will suggest to simply use $(“#ticket_form”).submit(function() { event to validate fields, before submitting the form or else you can use Jquery form validation library as well.
We joined during office hours to discuss this further.
Business Usecase — When users create a new ticket in Freshservice, we want the users to be able to search for an ID and enter the ID in a specific field. Without this mandatory field, the portal should not create a ticket.
Problem — There is no intercepting event on the New Ticket page in Freshservice. While the app can solve the “search” part of the use case, it cannot prevent users from creating tickets without mandatory fields entered.
We reported this lack of feature as a feature request to the product team.
We alternatively looked at two options:
Build a background app that populates the list with IDs needed for the user and associates it with a custom ticket field created with the manage ticket fields module in Freshservice.
Build a sidebar app that can be opened on a user click (the ideal experience is open by default, this functionality is unavailable) and associate it with a custom ticket field created with the manage ticket fields module in Freshservice.