mark048 Posted July 29, 2010 Report Share Posted July 29, 2010 Is there a way on an update details page to put a script that will compare two different fields and ensure they match each other? If they do not match, to give an error and not allow the submission? I know that Caspio provides this for one field, but I want to compare two different fields... Thanks, Mark Quote Link to comment Share on other sites More sharing options...
bahar_vm Posted July 30, 2010 Report Share Posted July 30, 2010 This is possible using Java Script on the DataPage which check for the value of the fields and if they do not meet the condition, return false on submission. There are some sample scripts at viewforum.php?f=14 which give you an idea how to integrate Java Script within a Caspio form. To reach Caspio team to write the code please contact them at http://www.caspio.com/services/custom-a ... opment.asp. Best, Bahar M Quote Link to comment Share on other sites More sharing options...
mark048 Posted July 30, 2010 Author Report Share Posted July 30, 2010 Well I have this put together so far, but it doesn’t work... If anyone out there has any recommendations (if this is close), otherwise, Ill contact the above link for programming. Thanks, Mark... document.getElementById(“caspioformâ€).onsubmit=return checkCouponCodeval(“CouponCodeâ€,“couponcoderepeatâ€); Quote Link to comment Share on other sites More sharing options...
bahar_vm Posted July 31, 2010 Report Share Posted July 31, 2010 When calling a Caspio element you should use EditRecordFIELDNAME if it is on details page, for example if your field name is CouponCode then call it as: document.getElementById(“EditRecordCouponCodeâ€).value; Also when you call the function call it like (remove return): document.getElementById(“caspioformâ€).onsubmit= checkCouponCodeval(“CouponCodeâ€,“couponcoderepeatâ€); Hope this helps. Best, Bahar M. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.