You are not logged in.
Hi everyone.
I'm facing a challenge here and I wonder if someone can help me.
I need to change the "order" of items in the tickets template.
Ex: I created an "Additional field" and put it inside the "Default ticket template". Everything went fine.
But this "Additional field" appears in the botton of the form list. I want to bring it to the top of the form.
The plugin "Form Creator" helps to create and associate new fields to forms but it doesn't allow the user to change the "order" or the "position" of the fields.
I tried attach some pictures to this topic showing exactly what I want in a "easy visual way". But I couldn't figure out how to do that.
Is there anyone here who already face this situation? There is a solution for this?
Thanks everyone.
Last edited by leonardo.evaldt (2024-09-13 20:47:47)
Offline
Ticket templates do not let you reorder the fields.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Thanks for the Reply cconard696.
There is a way to do this by API?
Leonardo
Offline
No. Ticket/Asset/etc fields cannot be reordered at all.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
OK, Thanks cconard96.
Offline
I have figured out how to change the field order, taking the Ticket form as an example, you can find the showForm function in Ticket.php. This function calls the components/itilobject/fields_panel.html.twig file to display various fields. Therefore, we can modify the content in components/itilobject/fields_panel.html.twig to change the order of the fields in Ticket form.
Offline
Thanks a lot helsing. I'll try your solution and I get back to report the results.
Regards.
Offline