Disable an Input Field

When I set an input field to read only it is still editable in preview mode. Am I doing something wrong? How do I disable it?