  Context. The role of magnetic fields during the formation of high-mass stars
is not yet fully understood, and the processes related to the early
fragmentation and collapse are largely unexplored today. The high-mass star
forming region G9.62+0.19 is a well known source, presenting several cores at
different evolutionary stages. Aims. We determine the magnetic field morphology
and strength in the high-mass star forming region G9.62+0.19, to investigate
its relation to the evolutionary sequence of the cores. Methods. We use Band 7
ALMA observations in full polarisation mode and we analyse the polarised dust
emission. We estimate the magnetic field strength via the
Davis-Chandrasekhar-Fermi and the Structure Function methods. Results. We
resolve several protostellar cores embedded in a bright and dusty filamentary
structure. The polarised emission is clearly detected in six regions. Moreover
the magnetic field is oriented along the filament and appears perpendicular to
the direction of the outflows. We suggest an evolutionary sequence of the
magnetic field, and the less evolved hot core exhibits a magnetic field
stronger than the more evolved one. We detect linear polarisation from thermal
line emission and we tentatively compared linear polarisation vectors from our
observations with previous linearly polarised OH masers observations. We also
compute the spectral index, the column density and the mass for some of the
cores. Conclusions. The high magnetic field strength and the smooth polarised
emission indicate that the magnetic field could play an important role for the
fragmentation and the collapse process in the star forming region G9.62+019 and
that the evolution of the cores can be magnetically regulated. On average, the
magnetic field derived by the linear polarised emission from dust, thermal
lines and masers is pointing in the same direction and has consistent strength.
