We prove the principle of maximal transcendentality for a class of form factors, including the general two-loop minimal form factors, the two-loop three-point form factor of tr(F2), and the two-loop four-point form factor of tr(F3). Our proof is based on a recently developed bootstrap method using the representation of master integral expansions, together with some unitarity cuts that are universal in general gauge theories. The maximally transcendental parts of the two-loop four-gluon form factor of tr(F3) are obtained for the first time in both planar mathcal{N} = 4 SYM and pure YM theories. This form factor can be understood as the Higgs-plus-four-gluon amplitudes involving a dimension-seven operator in the Higgs effective theory. In this case, we find that the maximally transcendental part of the mathcal{N} = 4 SYM result is different from that of pure YM, and the discrepancy is due to the gluino-loop contributions in mathcal{N} = 4 SYM. In contrast, the scalar-loop contributions have no maximally transcendental parts. Thus, the maximal transcendentality principle still holds for the form factor results in mathcal{N} = 4 SYM and QCD, after a proper identification of the fundamental quarks and adjoint gluinos as nf→ 4Nc. This seems to be the first example of the maximally transcendental principle that involves fermion-loop contributions. As another intriguing observation, we find that the four-point form factor of the half-BPS tr(ϕ3) operator is precisely a building block in the form factor of tr(F3).