fusweb Posted June 9, 2012 Report Share Posted June 9, 2012 Hi, very new to Caspio and would appreciate any assistance. I need to generate a dialogue box when a dropdown is changed to a certain condition. Dropdown field name is 'Status'. When 'Closed' is selected from dropdown I need a pop-up to appear and display a warning box along the lines of 'This job will be closed when form is submitted'. The box just needs an 'OK' as it's simply a warning to the user. Thanks in advance Kind regards Mat Quote Link to comment Share on other sites More sharing options...
MayMusic Posted June 12, 2012 Report Share Posted June 12, 2012 You have this code in the footer of the submission page: function show(){ var e = document.getElementById("InsertRecordDropDownFIELDNAME"); var strUser = e.options[e.selectedIndex].value; if (strUser == "closed") {alert("It will be closed.") } } document.getElementById("InsertRecordDropDownFIELDNAME").onchange=show; You need to replace "DropDownFIELDNAME" with the actual dropdown field name. And if it is an update or details page you need to replace "InsertRecordDropDownFIELDNAME" with "EditRecordDropDownFIELDNAME" Good Luck Quote Link to comment Share on other sites More sharing options...
fusweb Posted June 23, 2012 Author Report Share Posted June 23, 2012 Apologies for the delay in posting back. Many thanks for this code - it worked just fine. Quote Link to comment Share on other sites More sharing options...
aquintanilla Posted September 23, 2021 Report Share Posted September 23, 2021 Hi! Can I use a virtual in the " FIELDNAME"? Or does it has to be an actual field? Quote Link to comment Share on other sites More sharing options...
kpcollier Posted September 23, 2021 Report Share Posted September 23, 2021 10 minutes ago, aquintanilla said: Hi! Can I use a virtual in the " FIELDNAME"? Or does it has to be an actual field? You should be able to. Instead of "InsertRecordFIELDNAME" you would do "cbParamVirtualNUMBER", where NUMBER is the number of the Virtual Field you are using (in the DP Wizard, they show up like Virtual12, you would use cbParamVirtual12). Quote Link to comment Share on other sites More sharing options...
chumkirebzi Posted September 4 Report Share Posted September 4 Hi Everyone! Sharing this JS Guide: Caspio Form Elements which is a big help in knowing how to reference the fields, and even multiple forms! Good luck! 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.