Writing Integrals using Differential Forms

For an oriented m-dimensional Riemannian manifold $(M,g)$ there is a unique m-form $\omega$ such that $\omega_{p}(e_{1},\ldots,e_{m})=1$ for $\lbrace e_{i} \rbrace_{i=1}^{m}\subset T_{p}M$ a g-orthonormal basis ordered according to the orientation. For a function $f$ on $M$ which is sufficiently nice one defines $\int\limits_{M} f:= \int\limits_{M}f \cdot \omega$. For a chart $\phi: U \to \phi(U)=:O$ it is easy to check that $\phi^{*}\omega=\sqrt{\det(g(x))} dx^{1}\wedge \cdots \wedge dx^{m}$ where $g$ is the matrix of $\phi^{*}g = \sum\limits_{i,j}g_{ij}(x) dx^{i} \otimes dx^{j}$. Thus $$ \begin{aligned}\int\limits_{O}f &= \int\limits_{O}f \cdot \omega = \int\limits_{U} \phi^{*}(f \cdot \omega) \\ &=\int\limits_{U}f(\phi(x))\sqrt{\det(g(x))} dx^{1}\wedge \cdots \wedge dx^{m} \equiv \int\limits_{U}f(\phi(x))\sqrt{\det(g(x))} dx. \end{aligned}$$

You are dealing with submanifolds $M$ of Euclidean space $(\mathbb{R}^{n},\delta)$, for which you naturally use the Riemannian metric induced by restricting the Euclidean metric to your submanifold, $g=\delta\big\vert_{M}$. As $\delta=\sum\limits_{i=1}^{n}dy^{i} \otimes dy^{i}$ for the usual coordinates you have for a chart $\det(g(x))=\det((D\phi(x))^{t}D\phi(x))$ where $D\phi(x)$ is the matrix of the differential of $\phi$, leaving us with $$ \int\limits_{O} f = \int\limits_{U}f(\phi(x))\sqrt{\det((D\phi(x))^{t}D\phi(x))} dx.$$ For curves $\gamma: I \to \mathbb{R}^{n}$ it obviously reduces to $\det(g(t))=\Vert \dot{\gamma}(t) \Vert_{2}^{2}$, giving the formula you wrote down. For a surface in $\mathbb{R}^{3}$ it also gives the formula you want, but I leave it to you to check that.

Remark. You probably are not familiar with certain notions I have used here, since no one actually introduces these notions in Analysis I/II in the same generality. You might want to look those things up if you are really interested into certain details or wait for the course in Differential Geometry.