For a manifold with boundary, the restriction of Chern's transgression form of the Euler curvature form over the boundary is closed. Its cohomology class is called the secondary Chern– Euler class and was used by Sha to formulate a relative Poincaré–Hopf theorem under the condition that the metric on the manifold is locally product near the boundary. We show that the secondary Chern–Euler form is exact away from the outward and inward unit normal vectors of the boundary by explicitly constructing a transgression form. Using Stokes’ theorem, this evaluates the boundary term in Sha's relative Poincaré–Hopf theorem in terms of more classical indices of the tangential projection of a vector field. This evaluation in particular shows that Sha's relative Poincaré–Hopf theorem is equivalent to the more classical law of vector fields.