Fix a bug in object attributes and add more form field types.