Jump to content

JohnM

Caspio Ninja
  • Posts

    41
  • Joined

  • Last visited

Reputation Activity

  1. Like
    JohnM reacted to sandy159 in Add info about a table?   
    Hi @JohnM,
    Yes, you may add more details about fields in the Description area in Table Design:
    Description – Use this section to enter a short description for the currently selected field as a future reminder, comment, or note. This is helpful if more than one person will be developing apps using the same table. The content of the description field is not visible in your apps.
    https://howto.caspio.com/tables-and-views/creating-and-modifying-a-table/
    It is also possible to add Notes for the whole table in Properties:

  2. Like
    JohnM reacted to CoopperBackpack in Display a calculated field as a URL?   
    Hello @JohnM,
    As far as I know in Release 34.0 this functionality was added. I mean rendering Calculated Field as HTML.
    The site with my account has already been updated with Release 34.0 so I can use the formulas like this:
    Example 1:

    Output: 

     
    Example 2:

     
    Output: 


    I'm assuming the site your account is on hasn't been updated yet.
    Also, it can depend on the formula you use. 
    Hope this helps.
  3. Like
    JohnM reacted to Flowers4Algernon in Get image from Google Drive   
    Hi everyone!
    Just wanted to share this solution that I have done when I wanted to use my google drive as my image source. 
    1. On your image's shareable link, copy the ID or the set of characters after /d/ and /view/.
    2. Use the ID you have extracted to this new URL: https://drive.google.com/uc?export=view&id=
     
    Hope this will help someone! 
  4. Thanks
    JohnM reacted to CoopperBackpack in “Incompatible data in one or more fields. Values cannot be changed due to a data restriction.”   
    @JohnM,
    As I understand, these 3 fields have Integer data type: Day_of_Month, Month, Year.
    I can reproduce this issue in my account. 
    I was able to fix this error when I use 'IS NOT NULL' instead of <> ''
    CASE WHEN [@field:Year] IS NOT NULL THEN CAST([@field:Year] AS VARCHAR(4)) WHEN [@field:Month] IS NOT NULL OR [@field:Day_of_Month] IS NOT NULL THEN '-' ELSE '' END + CASE WHEN [@field:Month] IS NOT NULL THEN '-' + RIGHT ('00' + CAST([@field:Month] AS VARCHAR(2)),2) WHEN [@field:Day_of_Month] IS NOT NULL THEN '-' ELSE '' END + CASE WHEN [@field:Day_of_Month] IS NOT NULL THEN '-' + RIGHT ('00' + CAST([@field:Day_of_Month] AS VARCHAR(2)),2) ELSE '' END  
  5. Like
    JohnM reacted to Volomeister in Set CSS inside Text Area that has HTML editor   
    Hi!
    You can add next line of code inside else:
    iframeDocument.querySelector('head').insertAdjacentHTML('beforeend', `<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open Sans">`) But then, you would need to explicitly say which element(s) on the page should use this font, by defining 'font-familiy' CSS property, e.g.:
     
    iframeDocument.querySelector('body').style = 'font-family: "Open Sans"; font-size: 3rem; color: blue;'  
  6. Like
    JohnM reacted to KlisaN137 in Prepopulate values-to-be-added so as to match search criteria   
    Hi JohnM,
    If you want to autopopulate InlineInsert with values from your same-page Search Form, you can use the following code:
    <script> document.addEventListener('DataPageReady', function (event) { const search = document.querySelector('input[name="Mod0InlineAdd"]') search.addEventListener('mouseenter', getValues); search.removeEventListener('mouseleave', getValues); // Add how many elements you want populated, these are selectors for InlineInsert const inlineAddText = document.querySelector('input[name="InlineAddText255Field"]'); const inlineAddNumber = document.querySelector('input[name="InlineAddNumberField"]'); const inlineAddLocation = document.querySelector('input[name="InlineAddLocation"]'); // These are fields from Search Form const searchText = document.querySelector('input[name="Value2_1"]'); const searchNumber = document.querySelector('input[name="Value1_1"]'); const searchLocation = document.querySelector('input[name="Value3_1"]'); function getValues(){ if(searchText.value.length > 0) inlineAddText.value = searchText.value; if(searchNumber.value.length > 0) inlineAddNumber.value = searchNumber.value; if(searchLocation.value.length > 0) inlineAddLocation.value = searchLocation.value; } }); </script> When you are about to click on the 'Add' button, fields in InlineAdd element should populate with values from corresponding search fields.
  7. Like
    JohnM reacted to Volomeister in Set CSS inside Text Area that has HTML editor   
    Hi John!

    Here is a soluition that might work.
    <script> document.addEventListener('DataPageReady', _=> { let interval = window.setInterval( _=> { // using interval function, because right after data page is loaded, iframe is not available yet if(document.querySelector("iframe") == null) { // if you have more than 1 iframe, you would need to use more specific selector return; } else { window.clearInterval(interval); let iframeDocument = document.querySelector("iframe").contentDocument; iframeDocument.querySelector('body').style = 'font-size: 3rem; color: blue;' // just configure selector and style to your needs } }, 300) }) </script> Let me know if it solves your issue
     
  8. Like
    JohnM reacted to CoopperBackpack in CSS Selector for an Authetication page?   
    Hello @JohnM,
    Please test the code from this Forum post https://forums.caspio.com/topic/8977-how-to-center-the-details-datapage/
    Go to the Authentication -> click the Plus sign to add the Header/Footer elements -> disable the HTML editor on the Advanced tab -> paste this code
    <style>
    #caspioform > div {
      margin: 0 auto;
    }
    </style>
     

    Check if it works as expected.
  9. Thanks
    JohnM reacted to PotatoMato in INSERT NEW RECORD from a Details page?   
    Hi @JohnM. That is correct. You must create a new Submission datapage and button on your Details page to redirect users to add new record. You can also check this forum post: 
     
×
×
  • Create New...