sleepinggypsy Posted February 25, 2006 Posted February 25, 2006 Is there a good way to prevent users from entering a carriage return when trying to submit a form? In my case, the user is entering search criteria into a text field. Many users automatically hit enter instead of the submit button (thus creating a return). It is messing up my find script. I have tried using the trim and substitute functions to remove this return and it seems as if the return is removed. However, the script still doesn't work. I have also tried Field behavior (ie: setting tab, return, enter to move to next field) on the field. WORKS LOCALLY IN FMP, BUT doesn't seem to work in the browser. Any ideas?
Reed Posted February 25, 2006 Posted February 25, 2006 If you don't actually let your users use find mode in IWP, you can control their searches with a script. Set up a layout of global fields that you use to allow users to fill in search parameters. When the user clicks a button to perform the search, your script will remove any return characters and properly format the search parameters, then go to find mode and use Set Field[] to populate the "real" search fields with the requests, and then perform the find and return the user to the list of results. The user doesn't see anything but the search form and the results...
sleepinggypsy Posted February 26, 2006 Author Posted February 26, 2006 exactly what I am doing. So the "return" space is eliminated but for some reason the search fails anyway. Is there a way in IWP to force the submit of the search (and subsequent script) when a user hits enter or return, similar to what happens in most web sites?
kaduby Posted August 15, 2007 Posted August 15, 2007 I have the same problem. If you have found a solution Sleepinggypsy please let me know. thanks, Kaduby
Recommended Posts
This topic is 6579 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now