Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CDML, how can I validate required fields from "newrecd" webpage?

Status
Not open for further replies.

mcarey

Instructor
Feb 13, 2002
7
US
In the past I have always validated input fields, I wanted to be required on a CDML"New Record" web page, by placing a Validation on the field in the Filemaker Pro database. When the field is left empty on the web page and the form is submitted the FM database throws an error at the Web Companion CGI which triggers my CDML error page. The Filemaker Pro DB does not create the record and waits to get a request from the CGI that contains the required fields. This used to work fine. Now I find out that one of my solutions does not work that way.....THE DB does create the record AND the CGI still gets the error which prompts my web error page. OF course I do not want the DB to create a record when any of the required fields are empty. It seems that if the DB is very simple the record is not created, when the validation is not true....but sometimes when the DB is more complicated....(relationships, lookups, etc) the DB does create the record from the web even when the validation is false. I have tried rewriting the DB from scratch etc...to no avial. Filemaker Tech support just told me it was a known issue...and the only work around they knew was to write java script. "Boy, I never hear them talk like that when I listen to them extol the virtues of Filemaker solutions and the web at a computer show!!

I have a "new records" web page with two drop down menu fields, eight(4 choice) radio button fields and one text area field the user fills out. the drop down menu fields and radio button fields are all set in Filemaker Pro as Text fields with the NotEmpty validation set. Currently when the user leaves any of the validated fields empty on the web....and they hit the NEW RECORD button they are sent to the CDML error page I have created...but the database still creates a record.

DOES ANYONE know how I can get around this problem and validate these fields so a record is not created when the validation is not met. CDML or JAVA Script would be fine....only with Java script I will need some hand holding as I am a true novice in that area. Thank you in advance for any help you can provide.

-Mac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top