You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2024-09-13 20:46:38

leonardo.evaldt
Member
Registered: 2024-09-13
Posts: 11

Change the "ORDER" of itens in a template

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

#2 2024-09-16 14:10:20

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,809
Website

Re: Change the "ORDER" of itens in a template

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

#3 2024-09-17 05:09:46

leonardo.evaldt
Member
Registered: 2024-09-13
Posts: 11

Re: Change the "ORDER" of itens in a template

Thanks for the Reply cconard696.

There is a way to do this by API?

Leonardo

Offline

#4 2024-09-17 17:03:23

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,809
Website

Re: Change the "ORDER" of itens in a template

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

#5 2024-09-18 01:41:53

leonardo.evaldt
Member
Registered: 2024-09-13
Posts: 11

Re: Change the "ORDER" of itens in a template

OK, Thanks cconard96.

Offline

#6 2024-09-19 06:51:48

helsing
Member
Registered: 2024-09-19
Posts: 2

Re: Change the "ORDER" of itens in a template

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

#7 2024-09-20 16:31:08

leonardo.evaldt
Member
Registered: 2024-09-13
Posts: 11

Re: Change the "ORDER" of itens in a template

Thanks a lot helsing. I'll try your solution and I get back to report the results.

Regards.

Offline

Board footer

Powered by FluxBB