Jump to content

LWSChad

Caspio Rockstar
  • Posts

    259
  • Joined

  • Last visited

  • Days Won

    34

Reputation Activity

  1. Like
    LWSChad reacted to logistics in Outer box line and space below outer box   
    Thank you so much! That did the trick
  2. Like
    LWSChad got a reaction from logistics in Outer box line and space below outer box   
    On the element "table[data-cb-name="cbTable"]" there are two styles you can remove
    box-shadow: rgb(0, 0, 0) 0px 0px 0px 6px
    and
    margin: 10px 80px 80px
     
    If you can't find where these styles originate from in Caspio Styles, add to "user-defined styles"
    CSS
    table[data-cb-name="cbTable"] { box-shadow: none; margin: 0 auto; }  
  3. Like
    LWSChad reacted to GoCubbies in Is it possible to have javascript to get data from a virtual field which has the form element cascading text field   
    Hello Jonathan,
    Try something like this: var x = document.getElementsByName("cbParamVirtual1")[0].value;
    You may want to take a look at the post on Caspio Form Elements for more references as well.
  4. Like
    LWSChad got a reaction from aam82 in Caspio Param [@cbUserAgentString]   
    Found a solution
    http://www.useragentstring.com/
  5. Like
    LWSChad got a reaction from JEllington in How Do You Make A Dropdown (From A Search Page) Filter A Results Page Without Pressing Search Button?   
    Try Faking the Click
    CSS to hide the search button #searchID { display: none; } JS to click the hidden button document.getElementById('dropdownID').onchange = function(){ document.getElementById('searchID').click(); }
  6. Like
    LWSChad got a reaction from Kennylj24 in Passing Parameters Without Refreshing Page   
    Parent and Child are two different web pages.
     
    Parent - lead-info-center.html (excuse my lack of code box, I wanted to highlight things to help explain)
    -------------------------------------------------------
    <body onload="setIframeSource()">
     <div id="frmSummary1" class="licFr">
      <div class="divHeader">
       <h2>Summary</h2>
       <a onclick="window.ifrLeadSummary.location.href = 'lic-leadSummary.html'"></a><!-- refresh button -->
      </div>
      <div id="ifrDiv">
       <iframe name="ifrLeadSummary" class="licIframe" id="ifrLeadSummary"></iframe>
      </div>
     </div>
    <script>
      //set iframe source
      function setIframeSource() {
        varLeadID = getQueryVariable("LeadID");
        document.getElementById('ifrLeadSummary').src = 'lic-leadSummary.html?LeadID='+varLeadID;
      }
    </script>
    ------------------------------
     
     
    child - lic-leadSummary.html
    -------------------------------
    <body>
     <div id="ifr" class="ifrContent">
      <script type="application/javascript" src="https://b5.caspio.com/scripts/e1.js"></script>
      <script type="application/javascript">try{f_cbload("***","http:");}catch(v_e){;}</script>
     </div>
    </body>
    -------------------------------   The child is basically an html file with only the Caspio Deploy code.
     
    If you want a param to come from another iframe, you'll need some way to set the variable.
     
    The example you provided loads an entire second page, but your question seems like you want it all on one page. 
     
    The code above using a URL Query Variable (web-page.html?variable=value) from the page load, but you can get the value of an element and add it to the setIframeSource script. maybe something like...
    <script> //on click, set iframe source document.getElementById('buttonID').onclick = function () { var pSearch = document.getElementById('searchElementID').value; document.getElementById('ifrLeadSummary').src = 'child.html?filterField=' + pSearch; } </script> *********************
    To Build and Test, use alert(someVar); or alert('step1'); throughout your code. It allows you to see what values your variables are set at,,,, and where your code is breaking (when I'm writing something new that is proving challenging, I'll put alert('step[X]'); after every line to dial it in)
  7. Like
    LWSChad reacted to svitlanataran in Data Usage Thoughts, Tools, Tactics   
    If you want to have all the styles in one place as in your external CSS file you need to define the styles within your CSS file using the embedded HTML tags. Example:

    To define font-family for Caspio label you should look for the element tag on the web page (In Firefox you can install Firebug add-on to easily see the page elements without going into the source), so after you find the element tag which in the label case is "label" then you can write this code in your CSS:

    #caspioform label{
    font-family:Arial;
    }

    So basically .cbFormLabel class is not recognizable in your CSS file. This class is defined in Caspio Style object so when you embed a DataPage using this Style object, Caspio server compiles and converts these styles into inline styles and deliver it to the web page browser. That is why if you remove these classes within the Caspio Style, you need to define your own styles in the CSS for each Caspio element as explained in the example above.
     
    And I don't think, this will reduce data transfer.
  8. Like
    LWSChad got a reaction from aam82 in Filter And Sort - Two Different Fields   
    Append the following query to the link that opens this page
    ?CPIsortType=asc&CPIorderby=FIELD_NAME Use the DatePage wizard to sort DESCENDING on PrimaryID and limit records returned.
    Then sort using a URL query with the above code.
  9. Like
    LWSChad got a reaction from MayMusic in Conditional Formatting Trick   
    Check out this trick I stumbled upon.
     
    Put Caspio Variables into your Classes so you can use CSS to dynamically style your pages.
    (js not required)
     
     
    Div to dynamically format 
    <div class="action[@field:action]"></div> css
    .actionCall { background-image: URL("../img/call.png"); } .actionEmail { background-image: URL("../img/email.png"); } .actionText { background-image: URL("../img/text.png"); } Dynamic Elements - load all options, and hide all but needed
    <a class="btnFile fileName[@field:FileName]" href="../some/dir/[@field:FileName]">Download</a> <a class="btnLink fileLink[@field:FileLink]" href="[@field:FileLink]">View File</a> css
    /*-- when [@field:***] is null, hide the div --*/ .fileName, .fileLink { display: none; } Hope this helps
     
    Think Easy
    CHAD
    -I know the Title of this Forum is "Ask....", but IDK where else to share stuff like this.
  10. Like
    LWSChad reacted to jamesguffey3 in Multiple Fields in a Dropdown   
    I would like to be able to have multiple fields appear in a dropdown list. Currently, I have a dropdown on a datapage that displays a last name from another table. I would like for it to display a first and last name in that dropdown. Is there a way to do this?
    -Jim
  11. Like
    LWSChad got a reaction from sophietheand in Data Usage Thoughts, Tools, Tactics   
    Hi All,
    I had a great conversation with Caspio support a few weeks ago that helped my significantly reduce the amount of data that my app uses.
     
    Here are the cliff notes.
    To see how much data your pages use, paste the URL from the deploy menu into a new web browser, and use a development tool or web inspector to investigate. (in Chrome press F12, and click the Network tab) Records per page is a big factor in data usage... nearly a linear relationship. Ajax is a big load up front, but will help if you encounter many "paging" actions... long reports. Happy Building
  12. Like
    LWSChad got a reaction from skauntey in Data Usage Thoughts, Tools, Tactics   
    Hi All,
    I had a great conversation with Caspio support a few weeks ago that helped my significantly reduce the amount of data that my app uses.
     
    Here are the cliff notes.
    To see how much data your pages use, paste the URL from the deploy menu into a new web browser, and use a development tool or web inspector to investigate. (in Chrome press F12, and click the Network tab) Records per page is a big factor in data usage... nearly a linear relationship. Ajax is a big load up front, but will help if you encounter many "paging" actions... long reports. Happy Building
  13. Like
    LWSChad got a reaction from peterhanse in Data Usage Thoughts, Tools, Tactics   
    Hi All,
    I had a great conversation with Caspio support a few weeks ago that helped my significantly reduce the amount of data that my app uses.
     
    Here are the cliff notes.
    To see how much data your pages use, paste the URL from the deploy menu into a new web browser, and use a development tool or web inspector to investigate. (in Chrome press F12, and click the Network tab) Records per page is a big factor in data usage... nearly a linear relationship. Ajax is a big load up front, but will help if you encounter many "paging" actions... long reports. Happy Building
  14. Like
    LWSChad got a reaction from svitlanataran in Data Usage Thoughts, Tools, Tactics   
    Hi All,
    I had a great conversation with Caspio support a few weeks ago that helped my significantly reduce the amount of data that my app uses.
     
    Here are the cliff notes.
    To see how much data your pages use, paste the URL from the deploy menu into a new web browser, and use a development tool or web inspector to investigate. (in Chrome press F12, and click the Network tab) Records per page is a big factor in data usage... nearly a linear relationship. Ajax is a big load up front, but will help if you encounter many "paging" actions... long reports. Happy Building
  15. Like
    LWSChad got a reaction from peterhanse in Dynamically Delete All Records In A Table   
    I think you'll need to cycle through the records and delete them one at a time. You can build an auto deleting details DataPage that will do this for you.
     
     
    based on-> http://forums.caspio.com/index.php/topic/4314-js-auto-submit-a-datapage/ with some changes
    <script type="text/javascript"> if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; setTimeout('document.getElementById('Mod0DeleteRecord').click()',300); } </script> Destination after record update "Go to the next record"
  16. Like
    LWSChad got a reaction from svitlanataran in Label Position Set To Left   
    This is probably a workaround, but if it works it's very easy...
     
    CSS in the header of your DataPage maybe?
     
    <style>
    label {
        margin: top right bottom left;
        padding: top right bottom left;
        width: 80px;
        etc.

    </style>
  17. Like
    LWSChad reacted to skauntey in Consolidating Various Search Boxes To A Single Search Field   
    Hi Chad
     
    I know I am late in responding but thanks for this. It is a clever solution.
     
    Best,
  18. Like
    LWSChad got a reaction from aam82 in Consolidating Various Search Boxes To A Single Search Field   
    Use a virtual field that passes a parameter; perhaps [@searchCriteria]
    Follow that with a dropdown and pass this parameter; maybe [@searchType]
     
    Then include [@searchType] in the path for where to go after a search.
     
     
    [@searchType].html?searchCriteria=[@searchCriteria]
  19. Like
    LWSChad got a reaction from humbabba in Lock Record When In Use   
    A work around.
     
    Setup:
    Create a Locked Record field to your table.
     
    1. User clicks edit
    2. Update Data Page with the Auto-Submit script found ->> http://forums.caspio.com/index.php/topic/4314-js-auto-submit-a-datapage
     2. a. If "Locked Record" = "Yes" then display a message and abort the edit.
     2. b. Use this to change your new Locked Record field to locked.
    3. Redirect to the main edit Data Page.
     3. a . Include a hidden field that will turn the "Locked Record" back to unlocked.
  20. Like
    LWSChad got a reaction from aam82 in Lock Record When In Use   
    A work around.
     
    Setup:
    Create a Locked Record field to your table.
     
    1. User clicks edit
    2. Update Data Page with the Auto-Submit script found ->> http://forums.caspio.com/index.php/topic/4314-js-auto-submit-a-datapage
     2. a. If "Locked Record" = "Yes" then display a message and abort the edit.
     2. b. Use this to change your new Locked Record field to locked.
    3. Redirect to the main edit Data Page.
     3. a . Include a hidden field that will turn the "Locked Record" back to unlocked.
  21. Like
    LWSChad got a reaction from svitlanataran in Conditional Formatting Trick   
    Check out this trick I stumbled upon.
     
    Put Caspio Variables into your Classes so you can use CSS to dynamically style your pages.
    (js not required)
     
     
    Div to dynamically format 
    <div class="action[@field:action]"></div> css
    .actionCall { background-image: URL("../img/call.png"); } .actionEmail { background-image: URL("../img/email.png"); } .actionText { background-image: URL("../img/text.png"); } Dynamic Elements - load all options, and hide all but needed
    <a class="btnFile fileName[@field:FileName]" href="../some/dir/[@field:FileName]">Download</a> <a class="btnLink fileLink[@field:FileLink]" href="[@field:FileLink]">View File</a> css
    /*-- when [@field:***] is null, hide the div --*/ .fileName, .fileLink { display: none; } Hope this helps
     
    Think Easy
    CHAD
    -I know the Title of this Forum is "Ask....", but IDK where else to share stuff like this.
  22. Like
    LWSChad got a reaction from Xiang in Recording "record Count" Into Data Table?   
    You could pass that as a parameter to an "Update Data Page" that auto-submits, but DON'T DO THIS
     
    This is poor database design. Use a view to count the records on display.
  23. Like
    LWSChad got a reaction from Xiang in Hide Specific Blank Fields In Emails   
    Email clients don't allow <style> .xyz{ style: value;} </style>, so this answer is wrong.
    Correct answer below
    You could add a style section to the email and use the examples from
     
    http://forums.caspio.com/index.php/topic/5501-conditional-formatting-trick/
     
    <div class="some[@field:some]"></div>
     
    .some { display: none;}
     
    When field_some is blank .some will render the div not displayed
  24. Like
    LWSChad got a reaction from TWIRED in Id="caspioform" Scroll Height   
    Hello,
    Another formatting trick!
     
    I previously had challenges getting Caspio Forms to scroll properly. Then I learned about viewport in CSS -> https://web-design-weekly.com/2014/11/18/viewport-units-vw-vh-vmin-vmax/
    #caspioform {   overflow: auto;   height: calc(100vh - 96px); } I use calc() to take into account the header. If you use calc the spaces between the values and the operator(-,+,*,/) is required.
  25. Like
    LWSChad reacted to peterhanse in Hide A Submitbutton In The Header.   
    Thank you Chad, it was the bracket.
×
×
  • Create New...