  We show that tree-level form factors with length-two operators in
Yang-Mills-scalar (YMS) theory exhibit structures very similar to scattering
amplitudes of gluons and scalars, which leads to new relations between them.
Just like amplitudes, $n$-point Yang-Mills form factors with ${\rm tr}(F^2)$
operator can be decomposed as a linear combination of form factors with ${\rm
tr}(\phi^2)$ operator and $r$ external scalars in YMS theory, where the
coefficients are given by Lorentz products of the $r$ linearized field
strengths. Moreover, we show that any such $n$-point form factor of ${\rm
tr}(\phi^2)$ operator can be further expanded into $(n{+}1)$-point YMS
amplitudes with an additional off-shell scalar leg. In addition to unravelling
hidden structures, our results provide an efficient algorithm for computing
all-multiplicity length-two form factors in any dimension, as well as their
Cachazo-He-Yuan formulae via those of the YMS amplitudes.
