Jump to content

telepet

Caspio Ninja
  • Posts

    87
  • Joined

  • Last visited

  • Days Won

    3

telepet last won the day on November 19 2021

telepet had the most liked content!

Recent Profile Visitors

1,667 profile views

telepet's Achievements

  1. Thanks @Meekeee. The script your provided didn't seem to work. I also tried below variation below, which also did not work. I'll explore further the other info you provided and see if I can figure this out. <script type="text/javascript"> document.addEventListener('submit', function (event) { window.scrollTo({top: 0, behavior: 'smooth'}); }); </script>
  2. I have a Caspio form embedded in a webpage. I want scroll to top of webpage upon submission of form. Is that possible? The form is in an iFrame. From what I understand, you need to reference the form's ID and run something like the below in the footer. It doesn't seem to be working though. I wonder if it's because I don't have a correct form ID? <script type="text/javascript"> document.addEventListener("DOMContentLoaded", function() { document.getElementById('CaspioForm').addEventListener('submit', function() { window.parent.scrollTo(0, 0); }); }); </script>
  3. Thanks Everyone! @kpcollier, I added this to my header and it worked. Thank you! <style> input[id*="Submit"]{ display: none; } </style>
  4. Previously I was able to hide the Submit button with the following code in the header. It no longer appears to work. Perhaps something's been deprecated? <style> #Submit { display:none; } </style>
  5. Getting this same message today while attempting to import a .xlsx file. I import that file type all the time with no error message, as well as files with similar content.
  6. Thanks @Meekeee. I was able to get it working via he below code. I'm also am working on incorporating an additional Upload C option, which is proving harder to get working. I think it has to do with a flaw in my logic somewhere. Or, I'm learning about Javascript's switch functionality, and wondering if that might work better here. <script> var UploadA='[@field:Credential_Upload_A]'; var UploadB='[@field:Credential_Upload_B]'; var UploadC='[@field:Credential_Upload_C]'; // A populated, B & C are blank if (UploadA.length>0 && UploadB.length==0 && UploadC.length==0) { document.getElementById("EditRecordCredential_Upload_A").style.visibility = 'hidden'; document.getElementById("EditRecordCredential_Upload_ARemove").style.visibility = 'hidden'; document.querySelector('label[for="EditRecordCredential_Upload_ARemove"]').style.visibility = 'hidden'; document.getElementById("upload_button_A").style.visibility = 'hidden'; } // A & B populated, C is blank else if (UploadA.length>0 && UploadB.length>0 && UploadC.length==0) { document.getElementById("EditRecordCredential_Upload_B").style.visibility = 'hidden'; document.getElementById("EditRecordCredential_Upload_BRemove").style.visibility = 'hidden'; document.querySelector('label[for="EditRecordCredential_Upload_BRemove"]').style.visibility = 'hidden'; document.getElementById("upload_button_B").style.visibility = 'hidden'; document.getElementById("EditRecordCredential_Upload_A").style.visibility = 'hidden'; document.getElementById("EditRecordCredential_Upload_ARemove").style.visibility = 'hidden'; document.querySelector('label[for="EditRecordCredential_Upload_ARemove"]').style.visibility = 'hidden'; document.getElementById("upload_button_A").style.visibility = 'hidden'; } // Note: Unable to get this to work so just removed Upload C option // // // // A, B, and C are populated // else (UploadA.length>0 && UploadB.length>0 && UploadC.length>0) // { // document.getElementById("EditRecordCredential_Upload_C").style.visibility = 'hidden'; // document.getElementById("EditRecordCredential_Upload_CRemove").style.visibility = 'hidden'; // document.querySelector('label[for="EditRecordCredential_Upload_CRemove"]').style.visibility = 'hidden'; // document.getElementById("upload_button_C").style.visibility = 'hidden'; // document.getElementById("EditRecordCredential_Upload_B").style.visibility = 'hidden'; // document.getElementById("EditRecordCredential_Upload_BRemove").style.visibility = 'hidden'; // document.querySelector('label[for="EditRecordCredential_Upload_BRemove"]').style.visibility = 'hidden'; // document.getElementById("upload_button_B").style.visibility = 'hidden'; // document.getElementById("EditRecordCredential_Upload_A").style.visibility = 'hidden'; // document.getElementById("EditRecordCredential_Upload_ARemove").style.visibility = 'hidden'; // document.querySelector('label[for="EditRecordCredential_Upload_ARemove"]').style.visibility = 'hidden'; // document.getElementById("upload_button_A").style.visibility = 'hidden'; // } </script>
  7. I've since added an additional and additional upload "B", as well as "Upload" buttons for each upload. I'd like to have these button hidden upon a respective file being uploaded. Button A is coded like this, with Button B having a different id (upload_button_B): <input class="uploadButton" id="upload_button_A" name="Mod0EditRecord" type="submit" value="Upload" /> I've added the following commented lines in my Javascript in order to hide these upload buttons. However, the buttons remain visible even after file/s are uploaded. Below is my code. Any ideas what I might be doing wrong? <script> var UploadA='[@field:Credential_Upload_A]'; var UploadB='[@field:Credential_Upload_B]'; if (UploadA.length>0) { document.getElementById("EditRecordCredential_Upload_A").style.visibility = 'hidden'; document.getElementById("EditRecordCredential_Upload_ARemove").style.visibility = 'hidden'; document.querySelector('label[for="EditRecordCredential_Upload_ARemove"]').style.visibility = 'hidden'; document.getElementById("upload_button_A").style.visiblity = 'hidden'; //Hide upload button A } if (UploadB.length>0) { document.getElementById("EditRecordCredential_Upload_B").style.visibility = 'hidden'; document.getElementById("EditRecordCredential_Upload_BRemove").style.visibility = 'hidden'; document.querySelector('label[for="EditRecordCredential_Upload_BRemove"]').style.visibility = 'hidden'; document.getElementById("upload_button_B").style.visiblity = 'hidden'; //Hide upload button B } </script>
  8. @Meekeee thanks for the example script, but I'm afraid it's sill not working. The "Choose File" and "Remove" checkbox is still showing even after uploading a test file. @KlisaN137 the DataPage is tabular type, with Responsive set to be on. I wonder if I'm needing to adjust Element ID due to how Caspio does inserted and edited data ([@field:FIELDNAME] , [@InsertRecordFIELDNAME] and [@EditRecordFIELDNAME], per this Caspio article: Why do I get blank values in emails?
  9. I'm able to hide "Choose File" button by inserting the following code into the footer. However, it seems to show again once I click the "Update" button. Any ideas? <script> var UploadA='[@field:Credential_Upload_A]'; if (UploadA.length>0) { document.getElementById("EditRecordCredential_Upload_A").style.visibility = 'hidden'; document.getElementById("EditRecordCredential_Upload_ARemove").style.visibility = 'hidden'; } </script>
  10. Users are uploading files. Is there a way to append a prefix or suffix to the name of their uploaded file? For example, if someone uploads a file called myFile, I'd like to add date file was uploaded to the name of the file, as well well as name of user who uploaded file, along with text. So, myFile becomes myFile_uploaded_2021_11_10_by_userFirstName_userLastName.
  11. Is there a way to download in Logs (Beta)?
  12. Thanks @sandy159. I have a hunch a script I have in the header/footer may be the culprit. I will investigate further. In the interim, I've set up rules on the Details page so that Update and Back buttons only appear until users verifies all fields. It's a bandaid fix for this odd behavior. I'll update this thread if I figure out a better solution.
×
×
  • Create New...