Jump to content

MayMusic

Caspio Evangelist
  • Posts

    1,510
  • Joined

  • Last visited

  • Days Won

    78

Reputation Activity

  1. Like
    MayMusic got a reaction from ParkLoey in I Can't Redirect Users After Login.   
    You need to place the java script in the HTML DataPage not web page source code. Edit HTML DataPage, click on source and paste the code there
  2. Like
    MayMusic got a reaction from virtualHITman in Reset button on Search Form does not work as needed   
    Here is the code to create custom search again
    <a class="cbResultSetSearchAgainLink" href="URL"><img alt="Search again" src="https://c0cmr140.caspio.com/images/dp/SA_magnifier.png" style="vertical-align: text-bottom; border: 0px;" title="Search again" /> Search again</a>  
  3. Thanks
    MayMusic got a reaction from ChrisVI in Remove or reduce padding between Sections on datapage   
    It is better if you hide the section using JS
    Around that section add HTML Block one on top and have : <div id="section1">
    Below it add another HTML Block : </div>
    Use a code in following format to hide the div in last HTML Block after closing div
    <script> if (CONDITION){ document.getElementById('section1').style.display:none; } else { document.getElementById('section1').style.display:block; } </script>  
     
  4. Like
    MayMusic got a reaction from ParkLoey in HTML Datasource Grayed Out   
    You cannot have any source for HTML DataPages, since you cannot use to read or write to a table. But still you can authenticate it and get parameters from authentication on this page
  5. Thanks
    MayMusic got a reaction from HeyItsDoug in Remove "Data Table" tooltip   
    I have not tried the code but syntax needs a little modification:
    <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <script> $(document).ready(function(){ $("table[data-cb-name='cbTable']").removeAttr("title"); }); </script>  
  6. Sad
    MayMusic got a reaction from peewee in Using Multi-select listbox as criteria for Triggered Action   
    List DataTypes are not available in Triggered TASK or Triggered Actions yet. 
  7. Like
    MayMusic got a reaction from ManonG in Auto Submit Dropdown   
    <script type="text/javascript">   document.addEventListener("DataPageReady", function(event) { var dropdownvalue = document.getElementById("DropDownID").value; if (dropdownvalue == "THISOPTION")   document.forms["caspioform"].submit(); )} ; </script>
  8. Thanks
    MayMusic got a reaction from Ed727 in Remove scrollbar on listbox   
    Add this code to the header of the screen:
     
    <style> .cbFormSelect{ display: inline-block; vertical-align: top; overflow: hidden; border: solid grey 1px; } .cbFormSelect select{ padding: 10px; margin: -5px -20px -5px -5px; } </style>  
  9. Like
    MayMusic got a reaction from davidjeson in is it possible to disable AJAX without disabling JavaScript completely   
    Java scrip will not get disabled if you disable AJAX, but you need to adjust the code to work. For instance if you are using Caspio event handlers you need to replace them. Refer to this https://howto.caspio.com/release-notes/caspio-bridge-13-0/13-0-impacted-areas/.
    You need to reverse your code back.
  10. Thanks
    MayMusic got a reaction from Prophecy in Dynamic Sections in Datapages   
    Assign an ID to each section by adding HTML blocks before and after and under advanced tab uncheck HTML editor.
    HTML Block above:
    <div id="first_Section">
    HTML Block below:
    </div>
    Then have a JS to get the value and show/hide the section. If you have the link to the page I can give you the code
  11. Like
    MayMusic got a reaction from Alwayslost in Live Application Samples   
    Check these ready-made apps https://www.caspio.com/apps/
  12. Like
    MayMusic got a reaction from Syvill in Multiple submission base on user input   
    The source of the submission is different from where you get all rows. There are 3 tables here. One is QTY which has one Integer field holding 1 to 50. Two same tables MultiSubmit and MutliSubmitDetails.
     
    Submission is based on MultiSubmit and MutliSubmitDetails are having all rows including the initial row. 
     

  13. Like
    MayMusic got a reaction from Deanne in Elimate custom value on dropdown   
    This is not customizable by standard features. You can either have a default value or not.  But using JS. you can count the number of options in the dropdown when it is fully loaded and if there is only two then remove the first option.
     
  14. Like
    MayMusic got a reaction from yoinkadventures in Hide "Register as new user" after logged in   
    It is better to have the link to the registration page and also a link to retrieve the password in the footer of the Authentication. Edit your authentication and use the + Sign to add Header/Footer and create your hyperlinks in the Footer of the page.  So the user will always see the login and two links to register or retrieve password. 
  15. Thanks
    MayMusic got a reaction from Vitalikssssss in Total Hours Worked / Datediff   
    Count the total mins either in the table or as cal field on your report. Here we call it TimeSpan

     

    Datediff(minute,[@field:StartTime], [@field:EndTime])

     

    Then in the aggregation use that to get the total:

     

    CAST ((SUM(TimeSpan)/60) AS VARCHAR(6)) + ':' +CAST ((SUM(TimeSpan)%60) AS VARCHAR(2))

  16. Like
    MayMusic got a reaction from jafranklin77 in Phone number Formatting   
    Are you trying the code on an update form or submission form? the format of the IDs you are referring to on an update/details page is different from submission. What is the link to the page where you have this code on which is throwing an error?
  17. Like
    MayMusic got a reaction from jafranklin77 in Phone number Formatting   
    In this link, you can find how to refer to an element on different DataPage types
     
  18. Like
    MayMusic got a reaction from jafranklin77 in Auto format a phone number field javascript   
    You can try to add a if statement to check and see if it is blank. For instance:
     
     
    <SCRIPT LANGUAGE="JavaScript"> function tel() { var message = document.getElementById("InsertRecordTEL").value; // here you get what the end-user typed if (message != "") { document.getElementById("InsertRecordTEL").value = (message.replace(/[^\d]/g, '')); // then you strip off all the spaces var message1 = document.getElementById("InsertRecordTEL").value; document.getElementById("InsertRecordTEL").value = ("(" + message1.substring(0,3) + ") " + message1.substring(3,6) + "-" + message1.substring(6,10)); } } document.getElementById("caspioform").onsubmit=tel; </SCRIPT>
  19. Like
    MayMusic got a reaction from viviannaidoo in Copy data from one table to another when a field matches   
    If that is the case, you can create a TASK instead of a triggered action. The difference is that it will run on a scheduled basis and will move the percent for all matching names.
  20. Thanks
    MayMusic got a reaction from kpcollier in Change background color after expired   
    Since in pivot you cannot use JS I do no think we can customize the color of the data
  21. Like
    MayMusic got a reaction from jimarch in Single Sign On - One Table for All Apps   
    So basically you need to share the member user table among apps. There needs to be another field in this table which is holding the app name. Now the authentication for each app should be based on a view which is filtered by app name field.
  22. Thanks
    MayMusic got a reaction from Henco in Number to Hexadecimal converter   
    If you are on a submission DataPage and you have an input for the number with the field name: "NumberValue" and another field where you want to store "Hex" you can use the code below in the footer
    <div id=d1></div> <script language='JavaScript' type='text/JavaScript'> <!-- document.getElementsByName("Submit")[0].onmouseover = function (){ var n1=document.getElementById("InsertRecordNumberValue").value; if(isNaN(n1)){ document.getElementById("d1").innerHTML=document.getElementById('t1').value + " is not a number "; }else{ n1=parseInt(n1); var h = document.getElementById("InsertRecordHex").value =n1.toString(16); // Change the toString(16) to toString(8) or toString(2) get Octal and binary conversion } } //--> </script> on Details or update page as long as the form element is not "display only" and "cascading" you can change "InsertRecord" to "EditRecord" in the code above. 
  23. Like
    MayMusic got a reaction from Taneya in Dropdown List   
    You can change the DataType of the school field in the table from text to List - String and add the school options to the table. Refer to https://howto.caspio.com/tables-and-views/data-types/list/. 
    Then the user will have the option to select more than one or all
  24. Thanks
    MayMusic got a reaction from MiCro in Rule Help   
    Let's say if the value in another field is OTHER you want to unhide this field and make it require. Then you need to first add a section and have this field in a section as only one action per field is possible. Two rules you need:
    1- Value = OTHER make the field required
    2- Value is not equal = OTHER Make it Hidden
    So you are doing it the other way around instead of saying
    if value = OTHER Unhide
    you say
    If value is not OTHER Hide
  25. Like
    MayMusic got a reaction from molly1990 in Yesterday's Date   
    Use this code in the footer of the submission page:
    <script> today = new Date(); yesterday = new Date(today); yesterday.setDate(today.getDate() - 1); var dd = yesterday.getDate(); var mm = yesterday.getMonth()+1; //January is 0! var yyyy = yesterday.getFullYear(); if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} yesterday = mm+'/'+dd+'/'+yyyy; document.getElementById("InsertRecordStartDate").value = yesterday; </script> I got this code from https://stackoverflow.com/questions/16686640/function-to-get-yesterdays-date-in-javascript-in-format-dd-mm-yyyy
×
×
  • Create New...