How can I change the position of an extra field in a form?

My current Dolibarr Version is 20.0.4

I have already created an extra field which is going to be used in the Vendor proposal’s document.

The extra field works like a charm. Now I wonder if there’s a way to move the extra field on screen to be the first one in the left column, just above the “Discounts” field (Descuentos in my Screenshot).

What I have tried:

Changing the “Position” value, (“Puesto” in my Screenshot) from 100 to 1.

Any help is appreciated.

Can’t be done!

Yeah, that was my assumption too, first all the regular fields, then the extra fields. What if the position number is negative?

No. The negative number didn’t work.

I managed to trick it with some CSS, in the next sense:

[class^=trextrafields_collapse] {
  position: absolute;
  top: 258px;
}

.fichehalfleft {
  margin-top: 40px !important;
}

span.select2.select2-container.select2-container--default {
  text-align: initial;
  width: 180px !important;
  left: 40px;
  margin-right: 40px;
}

[id^=supplier_proposal_extras_prov2_] {
  padding-left: 40px;
}

The custom CSS code is placed in the Environment - CSS Style text area.

It -somehow- works and I feel fine now, but it is going to be hard to maintain in the future.

This is the results when reading:

Please notice the pencil is misplaced between the label and the data.

And this is when updating:

This helps for now. I hope somebody comes with a better idea.

1 Like