schip Posted July 7, 2003 Posted July 7, 2003 I have my form working and almost all validation can take place at the client side with javascript, but I also need to check if the e-mail address and the loginname are not already used. How do I check this? I have validation for the fields turned on, but how do I get a custom message displayed in the webpage saying that the e-mail address or loginname is already in the database? schip
omiossec Posted July 7, 2003 Posted July 7, 2003 You can simply make this field unique in your db. And on error page you can check for error number to display a custom message (If I remember this is 401 filemaker error code)
schip Posted July 7, 2003 Author Posted July 7, 2003 hmmmmmm, not completely the case I think. I don't get an errorpage but a windows message stating: data entry error: your attempt to save changes to the new record failed because of the following: not unique value on field "email" Si it sees that the value is not unique which is good, but I want the message to appear in an html page, or I want to be able to customize the windowsmessage.(preferrably the first one) schip
EddyB Posted July 7, 2003 Posted July 7, 2003 Hi Schip, What you need to do is add this to your page where you enter the new record: <INPUT TYPE="hidden" NAME="-error" VALUE="new_error.htm"> Then create a html page and call it new_error.htm This page should contain the following code: [FMP-IF: CurrentError.eq. 504] <P>EMail address and login already used.</P> [FMP-ELSE] <P>There was an error</P> [/FMP-IF] If error 504 occurs (Value in field is not unique as required in validation entry options) then the page will display the first message. If any other error occurs then it will display the second message. Ed.
EddyB Posted July 7, 2003 Posted July 7, 2003 After the [FMP-ELSE] you could also put: <P>There was an error. The code for this error is: [FMP-CURRENTERROR] please quote this error number when reporting this problem.</P> This will give the user the exact error code for what went wrong, you can then look up this error code in FMP help to see what the problem was. Ed.
schip Posted July 7, 2003 Author Posted July 7, 2003 Ed, excellent, thank you very much. Is there some kind of a help file specificly for filemaker related to webpages? I see a lot about publishing filemaker databases on the web, but basically that is not what I want. I want to store and retrieve data through a webpage... thanks again!
EddyB Posted July 7, 2003 Posted July 7, 2003 Hi Schip, There may be some help/tip files around but I'm not sure where, someone else may be able to point you in the right direction. What I can do is tell you that in FMP help there is a bit about FM with Webpages, not very much though or very useful for that matter. The best thing you can do is get the CDML reference database, it has all the CDML tags in there and tells you what they are. Do a search in the forum for this and they'll be several links to it. If you want to know more about Error codes, have a look in the FM help file for the function Status(CurrentError) the help file lists all the different error codes. And finally, if you get stuck on anything you can always ask in here there are loads of FM experts and several CDML experts in here who will gladly help you. I have learnt more in this forum in the last 3 months than I have in the last few years of developing in FM. It's the best FM forum around! Regards Ed.
Unable Posted July 8, 2003 Posted July 8, 2003 "I see a lot about publishing filemaker databases on the web..." "I want to store and retrieve data through a webpage..." Just how are you going to store data through a webpage? No, seriously! BTW "I want" is one of my very favorites because souls in Hell want ice water, and you have much better odds here. Not that you get what you want. And you should be careful about what you ask for, since you just might get it. If you want to store the data in a FMPro db, you are probably going to be involved in "publishing filemaker databases on the web". Publishing the database does not necessarily mean displaying data from the database (though that that can be useful to a solution). Publishing can include or be limited to putting data into the db file through a form or link or InlineAction. "Is there some kind of a help file specificly for filemaker related to webpages?" Since you seem to not want to study the examples which have been posted in the Sample Files forum, have you considered your local bookstore?
Recommended Posts
This topic is 7801 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