Form used on mobile device not working properly