Javascript object for configuring and building forms