Added support for input fields. Fixes #2.