is it possible to make the body field (comment) not mandatory while create a ticket?
In the list settings it is marked as not mandatory, in spforms it is marked as not required, but i can't save a ticket without this field filled.
The customer writes the problem in another field called problem-description that i have created.
I want to use the body field only for the conversation with the customer after the ticket is created.
Hello Daniel! I need to consult with developers on the issue. Before I get any results, could you let me know whether using a space character as an initial comment in the Body field or duplicating the issue description in it would work for you?
Thanks. Please inform me if you have a answer from the dev-team.
For now i already duplicated the field to the issue description. It bothers that the fields are the same and shows up.
Another solution could be to disable the first body item after copy it to the issue description.
And what about an "empty" initial comment? I mean if to use the space character as its contents. The task is quite tricky and requires some code developing. Perhaps, the "invisible" contents of the initial comment would work for you?
We got two helpdesks where we needed a similiar workaround. Since you mentioned another textfield in your default form I suspect that you use Plumsail Forms too. We solved this like suggested by @Evgeniy like:
fd.spRendered(function() {
ticketForm.Render();
fd.field('Body').ready().then(function() {
fd.field('Body').value = " ";
});
});
It will hide the Body field and make it unrequired. But form submission will anyway create an initial comment containing a null string visible in Edit and Display forms:
3. Use this style in both forms to hide it and save them:
Note: the initial null comment will remain in the notifications when you render all comments for the current ticket. You might either set it to a space character as suggested @mrFaulwurf (or some neutral string like "Beginning of the discussion") or design a complex template not to include it in the notification.
But how can i set a neutral string like "Beginning of the discussion". The approach from @mrFaulwurf does not work for me. It gives me an error that the Body-Field is missing.
Hello Daniel! Please ensure that you use the latest version of HelpDesk (2.1.31) and framework package (1.1.3), then you can use the code below:
/*Write your custom JavaScript here*/
/*DO NOT remove the code below. You need this for the correct work of your forms.*/
window.Plumsail.HelpDesk.Forms.register('ticket', fd, pnp, $, Dialog, Vue);
fd.hdFormReady(function() {
// Disable field
fd.field('Body').required = false;
// Set Default value
fd.field('Body').ready().then(function () {
fd.field('Body').value = "Default body.";
});
});
To hide the field, please use a custom class and styles: