The main aim of this paper is to introduce a new version of the Fokas-Gel'fand formula for immersion of soliton surfaces in Lie algebras. The paper contains a detailed exposition of the technique for obtaining exact forms of 2D-surfaces associated with any solution of a given nonlinear ordinary differential equation (ODE) which can be written in zero-curvature form. That is, for any generalized symmetry of the zero-curvature condition of the associated integrable model, it is possible to construct soliton surfaces whose Gauss-Mainardi-Codazzi equations are equivalent to infinitesimal deformations of the zero-curvature representation of the considered model. Conversely, it is shown (Proposition 1) that for a given immersion function of a 2D-soliton surface in a Lie algebra, it possible to derive the associated generalized vector field in evolutionary form which characterizes all symmetries of the zero-curvature condition. The theoretical considerations are illustrated via surfaces associated with the Painlev\'e equations P1, P2 and P3, including transcendental functions, the special cases of the rational and Airy solutions of P2 and the classical solutions of P3.