Let $(M^n,g)$ be a Riemannian manifold and $f:M\to\mathbb{R}$ a smooth function. Then the graph $S=\{(p,f(p))\mid p\in M\}$ is a submanifold of $(M\times\mathbb{R},g+g_{\mathbb{R}})$ and carries the induced metric $\tilde{g}=g+\nabla f\otimes \nabla f$.
Now I want to know, how to calculate the second fundamental form $h$ of $S$. In my intuition at every point $h_{(p,f(p))}(df_p(\cdot),df_p(\cdot)):T_pM\times T_pM\to \mathbb{R}$ has to be proportional to the Hessian $\operatorname{hess}(f)_p(\cdot,\cdot):T_pM\times T_pM\to \mathbb{R}$. Does anyone know the exact relation between those?
EDIT: The idea is: Define $\tilde{f}:M\times\mathbb{R}\to \mathbb{R}; (p,r)\mapsto f(p)-r$. Then $\tilde{f}^{-1}(0)=S$ and following Sun Park Joe's comment the second fundamental form at $\tilde{p}=(p,r)$ is given by $h_{\tilde{p}}(v,w)=\frac{hess(\tilde{f})_{\tilde{p}}(v,w)}{\left|\nabla \tilde{f}_{\tilde{p}}\right|}=\frac{hess(f)_p(d(f^{-1})_\tilde{p}~v~~,~~d(f^{-1})_{\tilde{p}}~w)}{\sqrt{1+\left|\nabla f_p\right|}}$. I hope, I got everything right..