Add support for data as object or form element