saguaro Posted July 5, 2013 Report Share Posted July 5, 2013 I have several text fields that are checkboxes. A checked box = "Yes" posted to that field. I would like to have another field automatically post value "Yes" IF one or more of the other fields are checked. So IF fieldA or fieldB or fieldC = "Yes" (checked) THEN fieldD = "Yes" (checked) If fields A,B and C are all unchecked (blank), then fieldD is also unchecked (blank). NOTE: I will be using this in new submission forms as well as editing detail pages. Any ideas would be helpful. Thanks!! Quote Link to comment Share on other sites More sharing options...
MayMusic Posted July 5, 2013 Report Share Posted July 5, 2013 You can try the code below in the footer of the page <script> function f_check(){ if (document.getElementById("A ID").checked && document.getElementById("B ID").checked&& document.getElementById("C ID").checked) { alert("yes"); document.getElementById("D ID").checked = true; } else if (!(document.getElementById("A ID").checked && document.getElementById("B ID").checked && document.getElementById("C ID").checked)) { document.getElementById("D ID").checked = false; } } document.getElementById('caspioform').onsubmit=f_check; </script> Replace all IDs with appropriate IDs on your page. In submission page it should be like:InsertRecordFIELDNAME and in details or update page it should be EditRecordFIELDNAME Quote Link to comment Share on other sites More sharing options...
leekro Posted July 31, 2013 Report Share Posted July 31, 2013 I have fields to which points need to be assigned. 1st place equals 4 points; 2nd place equals 3 points; and 3rd place equals 2 points. I need to assign these values as entries are submitted into these places. Any ideas or suggestions would be helpful. Thanks Quote Link to comment Share on other sites More sharing options...
MayMusic Posted August 2, 2013 Report Share Posted August 2, 2013 Can you explain a little more? How do you score each submitted record? Quote Link to comment Share on other sites More sharing options...
Kurumi Posted April 8, 2019 Report Share Posted April 8, 2019 Hi @saguaro, You could try using CASE-WHEN in Calculated Value. As of July 12, 2018, Caspio introduced new features which you can find here: https://howto.caspio.com/release-notes/caspio-bridge-13-0/ This release includes a new feature, Calculated Values in Submission Forms. This allows you to generate calculations which you can use for your checkbox. I hope this helps! 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.