February 25, 200619 yr 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?
February 25, 200619 yr 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...
February 26, 200619 yr Author 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?
August 15, 200718 yr I have the same problem. If you have found a solution Sleepinggypsy please let me know. thanks, Kaduby
Create an account or sign in to comment