In this article we study convex non-autonomous variational problems with differential forms and corresponding function spaces. We introduce a general framework for constructing counterexamples to the Lavrentiev gap, which we apply to several models, including the double phase, borderline case of double phase potential, and variable exponent. The results for the borderline case of double phase potential provide new insights even for the scalar case, i.e., variational problems with 0-forms.