![](http://content.invisioncic.com/r269793/set_resources_11/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
geoffdude
Caspio Ninja-
Posts
60 -
Joined
-
Last visited
-
Days Won
3
geoffdude last won the day on June 9 2021
geoffdude had the most liked content!
Recent Profile Visitors
geoffdude's Achievements
-
Hello all - I know there are many Multiselect listbox topics that touch on some of my issues, but I can't find any info on how to reset a checkbox to false (off) after it's triggered a change event. Quick summary: • I have a multiselect listbox named "chkbox1" that has 3 checkboxes / options. • I want to limit the selection options to only 2 allowed, and pass those checked values to a data table (which is does now). • Problem = once 3rd checkbox is checked, it fires to limit collected values correctly, and shows an alert msg correctly.. but the 3rd checkbox stays "checked" and I can't figure out how to have it reset to unchecked. • Test page form is here: https://c0esh141.caspio.com/dp/f988200040b732ce715c40458847 • Screen grab of problem below: • The top-most listbox named "address" uses the datatype "text 255" and it works fine, as intended. • However, the multiselect named "chkbox1" uses the datatype "list-string" and the problem of an unwanted checkbox still checked. My code is below. <script type="text/javascript"> // enable multiple selections of listbox "address" document.addEventListener('DataPageReady', assignMultiple); function assignMultiple() { let fieldNameB = "InsertRecordaddress"; let xB=document.getElementsByName(fieldNameB); xB[0].multiple=true; } // limit "address" choices with alert msg $(document).ready(function() { var myMultiListBoxAddy = document.getElementsByName("InsertRecordaddress")[0]; var last_valid_selected = null; $(myMultiListBoxAddy).change(function(event) { if ($(this).val().length > 3) { $(this).val(last_valid_selected); alert("Alert: you can't pick more than"+" "+($(this).val().length)+". "+"Your current selections are"+" "+last_valid_selected); } else { last_valid_selected = $(this).val(); } }); }); // limit "chkbox1" choices with alert msg $(document).ready(function() { var myMultiListBox = document.getElementsByName("InsertRecordchkbox1")[0]; var last_valid_checked = null; $(myMultiListBox).change(function(event) { if ($(this).val().length > 3) { $(this).val(last_valid_checked); alert("Howdy -"+" "+"You can't pick more than"+" "+($(this).val().length-1)+". "+"Your choices are numbers"+" "+last_valid_checked); } else { last_valid_checked = $(this).val(); } }); }); </script> Thx for any and all help. Geoff
-
kpcollier reacted to a post in a topic: Checkbox Onchange Unchecks Different Checkbox
-
I'm trying to figure out a way to change any character submitted to data table field, that's not 0-9 or A-Z/a-z to something else, using formula logic. I'm new to formulas, and this is what I'm playing with .. but it's not working as desired. It only runs the first "When" statement and ignores the others. CASE When Charindex ('''',[@field:promo], 0) <> 0 Then Replace([@field:promo], '''','') When Charindex ('é',[@field:promo], 0) <> 0 Then Replace([@field:promo], 'é','e') When Charindex ('ü',[@field:promo], 0) <> 0 Then Replace([@field:promo], 'ü','u') ELSE ( [@field:promo]) END Any tips, or ideas would be greatly appreciated. Thx
-
Reject submission without proper flow
geoffdude replied to ReadyOneIndustries's topic in User JavaScript and CSS Discussions
Still a bit confusing to me .. however, how would the product "fail" lining inspection? What process in the flow validates/checks for a "pass" or "fail"? -
Hide HTML Blocks in Detail Page
geoffdude replied to rush360's topic in User JavaScript and CSS Discussions
If you want to hide the info on result page of some kind, give your DIV an ID (use "box1") then try this: <script type="text/javascript"> document.addEventListener('DataPageReady', window.onload = function(){ var x = document.getElementsByName("InsertRecordZip3")[0].value; if (x == "") { document.getElementById("box1").style.display = 'none'; alert("Nothing entered - box hidden"); } else { document.getElementById("box1").style.display = 'block'; alert("Word entered - box not hidden"); } }); </script> <!-- add a style tag, with "box1" display set to 'block', then update your code for the DIV as below --> <style> #box1 {display:block}</style> <div id="box1" style="background:#eee;border:1px solid #ccc;padding:5px 10px;">Address:<br /> [@field:Address3]<br /> [@field:City3], [@field:State3]<br /> [@field:Country3], [@field:Zip3]</div> -
kpcollier reacted to a post in a topic: Reject submission without proper flow
-
Reject submission without proper flow
geoffdude replied to ReadyOneIndustries's topic in User JavaScript and CSS Discussions
Can you provide a wire-frame of the flow that way we can see what's supposed to happen. Like: Product = GARMENT X Serial Number = 123456 Emp Id = TestID-00001 Station = Choices (Station A, Station B, etc) Then create the wire-frame for us to look at ... like this example below, except show your form fields w/names and what should happen with it's use (It will help us to figure out the flow/logic.) -
Date Picker in iFrames Is Off Alignment
geoffdude replied to kpcollier's topic in User JavaScript and CSS Discussions
Excellent .. happy to help. -
kpcollier reacted to a post in a topic: Date Picker in iFrames Is Off Alignment
-
Date Picker in iFrames Is Off Alignment
geoffdude replied to kpcollier's topic in User JavaScript and CSS Discussions
My first thought is you CSS in causing errors. The form CSS may be the issue .. but it's hard to determine without seeing the form live. Some things to try on the code you provided are as follows: <style> .ui-resizable-helper { border: 1px dotted gray; } ul#menu .activeMenu { background: #bb3033; } ul#menu { width: 100%; background: #21618C; font-size: 10px; font-family: "Arial", sans-serif; font-weight: bold; list-style-type: none; margin: 0; padding: 0; text-align: center; } ul#menu li { display: block; display: inline-block; margin: 4px 0 0 0; padding: 5px 15px 5px 15px; cursor:pointer;} ul#menu li a {color: #fff; text-decoration: none; display: block; line-height: 200%; } ul#menu li a:hover { color: #333; } /* FIX(1) move li styles here */ li { font-size: 11px !important; font-weight: bold !important; } /* FIX(2) get rid of padding, border, make width 100%, get rid of display block and position too, make background grey for testing only */ .content{width: 100%; height:1024px; background: #e5e5e5; padding: 0px; border:0px solid #21618C; overflow:hidden;} /* FIX(3) get rid of padding, make width 50% (iFrame width), make background blue (iFrame background color) for testing only */ .ChannelView{ width:50%; height:100%; margin-bottom:100%; background:#aae2ee;} /* FIX(4) disable this media query as it does nothing for this page @media (max-width: 1024) { .content { width: 96.6%; background: #ff0000 !important; } } */ </style> Let see what this style code change does, then go from there. -
JS Change Event Firing on Failed Form Submission
geoffdude replied to SDSteve's topic in User JavaScript and CSS Discussions
You may need to create a copy of the form, then remove all the JS associated with that form and start testing by introducing portions of the script back into the test-form. You can also create a 3rd form copy to just focus on the fields that use the scripts, and run tests on these new forms to see when the error occurs. - It's a pain, but part of the developer process at times. Hunt and peck so to speak... without messing up your OG form. -
You need to pass the "Virtual7" value as a "parameter" in your form's advance setting for that field- such as: On exit: Pass field value as parameter: [@Virtual7] Then on your report page have that virtual field set as display only, but also have it set to receive the parameter: Receive value or parameter: External Parameters = [@Virtual7]
-
Date Range on Submission Form
geoffdude replied to Elderberg's topic in User JavaScript and CSS Discussions
I'm on 20.3 .. strange huh? Update: I had to clear my cache to see the new version changes. It's all good now.