Jump to content

Jan

Caspio Evangelist
  • Posts

    635
  • Joined

  • Last visited

  • Days Won

    35

Posts posted by Jan

  1. Hello Peco,

     

    In the article, they say:

     

    For Deployed DataPages:

    While the DataPages and applications you create using Caspio Bridge are compatible with all common browsers and operating systems (Windows, Mac OS, iOS, and Android), we recommend using our browser requirements above to ensure full functionality and performance.

     

    For Bridge (admin part):

    Please note that while you may be able to sign into Caspio Bridge with unsupported browsers, we highly recommend that you adhere to the above system requirements to ensure full product functionality, optimal user experience, and access to technical support.

  2. Hello Peco,

     

    As far as I know, only Windows, Mac OS, iOS, and Android are fully supported.

     

    You can use the "User Agent Switcher" plugin for firefox (https://addons.mozilla.org/en-US/firefox/addon/59/)

    Steps to login to Caspio Bridge from Linux:

    1. Go to the Tools menu in Firefox
    2. Select Default User Agent.
    3. Edit User Agents.
    4. Click New.
    5. Click New User Agent.
    6. A dialog box will appear and you can enter the information:
      • Description: Firefox Windows
      • User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Geko/20100401
      • App Code Name: Mozilla
      • App Name: Netscape
      • App Version: 5.0 (Windows; en-US)
      • Platform: Win32
      • Vendor: empty
      • Vendor Sub: empty
    7. Click Ok.
    8. Go back to the Tools menu
    9. Select Default User Agent
    10. Click Firefox Windows.

    I hope, it helps.

     

  3. Hello larsonchst,

     

    You can try setting the "Number" type for the field with the following code:

    (You can add an Header&Footer element to your Submission Form, select the Footer element, click the Source button and enter the code)

    <SCRIPT LANGUAGE="JavaScript">
    document.getElementById("InsertRecordFIELDNAME").setAttribute("type", "NUMBER");
    </SCRIPT>

    Please, enter the name of your field instead of "FIELDNAME".

     

    I hope, it helps.

  4. Hi Elena,

     

    As far as I know, if "onsubmit" is used more than one time, only the first "onsubmit" works.

    You can rewrite the whole code as well:

    <script>
    function trim_func()
    {
       var task1 = parseFloat(document.getElementById("EditRecordDuties_Task1_Time").value);
       var task2 = parseFloat(document.getElementById("EditRecordDuties_Task2_Time").value);
       var total  = task1 + task2;
       total = Math.round(total);
       var result = total + "%";
       document.getElementById("EditRecordTotalTaskTime").value = result;
    
      var fieldname = "Job_Purpose";
      var fieldname1 = "Duties_Task1";
      var fieldname2 = "Duties_Task2";
    
      fieldname = "EditRecord" + fieldname + fieldname1 + fieldname2;
      var entered_text = document.getElementById(fieldname).value;
      var entered_text = document.getElementById(fieldname1).value;
      var entered_text = document.getElementById(fieldname2).value;
    
      var n = 1;
      for (i=0;1<100;i++)
      {
        n = entered_text.indexOf("\n\n");
        if(n>-1)
          entered_text = entered_text.replace("\n\n","\n");
        else break;
      }
      document.getElementById(fieldname).value = entered_text;
      document.getElementById(fieldname1).value = entered_text;
      document.getElementById(fieldname2).value = entered_text;
    }
    document.getElementById("caspioform").onsubmit=trim_func;
    
    </script>

    I hope, it works.

  5. Hi Elena,

     

    Please try the following code:

    function calculate()
     {
       var task1 = parseFloat(document.getElementById(“EditRecordDuties_Task1_Time").value);
       var task2 = parseFloat(document.getElementById(“EditRecordDuties_Task2_Time").value);
       var total  = task1 + task2;
       total = Math.round(total);
       var result = total + "%";
       document.getElementById(“EditRecordTotalTaskTime").value = result;
     }
    
    document.getElementById("caspioform").onsubmit=calculate;
  6. Hello Cameron,

     

    You can follow the following steps (it is not an easy solution, but I do not know a better one):

    1.  Add a field to your table, name it, for example, "latin_text". Here text without Spain characters will be stored.
    2. Edit your Submission Form, add a Header&Footer element, select the Footer element, click the "Source" button and enter the following code:
    3. <SCRIPT LANGUAGE="JavaScript">
      
      function latin_text()
      {
      var original_field = "original_text";
      var latin_field = "latin_text";
      
      original_field = "InsertRecord" + original_field;
      latin_field = "InsertRecord" + latin_field;
      
      var latin_text = document.getElementById(original_field).value;
      latin_text = latin_text.replace(/á/g, "a");
      latin_text = latin_text.replace(/é/g, "e");
      latin_text = latin_text.replace(/í/g, "i");
      latin_text = latin_text.replace(/ó/g, "o");
      latin_text = latin_text.replace(/ú/g, "u");
      latin_text = latin_text.replace(/ü/g, "u");
      latin_text = latin_text.replace(/ñ/g, "n");
      latin_text = latin_text.replace(/Ã/g, "A");
      latin_text = latin_text.replace(/É/g, "E");
      latin_text = latin_text.replace(/Ã/g, "I");
      latin_text = latin_text.replace(/Ó/g, "O");
      latin_text = latin_text.replace(/Ú/g, "U");
      latin_text = latin_text.replace(/Ü/g, "U");
      latin_text = latin_text.replace(/Ñ/g, "N");
      document.getElementById(latin_field).value = latin_text;
      }
      
      document.getElementById("caspioform").onsubmit=latin_text;
      </SCRIPT>
      
    4. Please, enter the name of your current field instead of "original_text" and the name of a new field instead of "latin_text".
      Now, when a user enters a text, a copy of the text without Spain characters is added to the "latin_text" field.
    5. Edit your Report DataPage, open the "Configure Search Fields" screen, add the "latin_text" field, and set the Hidden Form Element for the field; open the Logic tab and change the group "AND" to "OR".
    6. On the screen, add a Header&Footer element, select the Footer element, click the "Source" button and enter the following code:
    <SCRIPT LANGUAGE="JavaScript">
    function look_for()
    {
    document.getElementById("Value2_1").value = document.getElementById("Value1_1").value;
    }
    document.getElementById("caspioform").onsubmit=look_for;
    </SCRIPT>

    In my screen, the "original_text" is the first field, so I used "Value1_1". The "latin_text" is the second field, and I used "Value2_1" for it. Please, enter the order numbers of your fields instead of 1 and 2, if they are different.

     

    Now, when a user enters a criteria, the text is copied to the second criteria and the text is searched in both Spain and English versions of the texts.

     

    I hope, it helps.

  7. Hi Aurora,

     

    You are right, it was not completely good code.

    You can use the update code (please, enter the name of you field instead of FIELDNAME and the correct number instead of "15":

    <SCRIPT LANGUAGE="JavaScript">
    function check_date()
    {
    var field_name = "FIELDNAME";
    var allowed_years = 15;
    
    field_name = "InsertRecord" + field_name;
    var entered_value = document.getElementById(field_name).value;
    var entered_date = new Date(entered_value);
    var entered_year = entered_date.getFullYear();
    var today = new Date();
    var current_year = today.getFullYear();
    var denied = false;
    
    if(current_year - entered_year <= allowed_years)
      {
       if (current_year - entered_year == allowed_years)
         {
          var entered_month = entered_date.getMonth();
          var current_month = today.getMonth();
          if (current_month <= entered_month)
            {
             if (current_month == entered_month)
               {
                var entered_day = entered_date.getDate();
                var current_day = today.getDate();
                if (current_day < entered_day)
                   denied = true;
               }
             else denied = true;
            }
         }
       else
         denied = true;
      }
    if (denied)
      {
       alert("Incorrect Birthday.");
       return false;
      }
    }
    document.getElementById("caspioform").onsubmit=check_date;
    </SCRIPT>
    

    I hope, it helps.

  8. Hi Aurora and piyali,

     

    I have used this generator.

    Please note, that the link does not work in the Preview mode.

    Please also note, that you should use the code as it is and click the "Source" button in your HTML Block or Header&Footer element:

    <a href="//pdfcrowd.com/url_to_pdf/">Save to PDF</a>

    You should do not change anything in the code.

     

    Could you please tell what does not work? Do you see any error message?

  9. Hello aam82,

     

    As far as I know, Aggregations are sub-queries, like SELECT sum(field) FROM table WHERE criteria that are entered on the Search form.

    Calculated fields are also a sub-queries, like "SELECT field FROM table WHERE criteria that are entered on the Search and the correspond record" + "SELECT field2 FROM table WHERE criteria that are entered on the Search and the correspond record".

     

    So, Aggregations of Calculated fields will be like:

    SELECT sum

    (

    "SELECT field FROM table WHERE criteria that are entered on the Search and the correspond record" + "SELECT field2 FROM table WHERE criteria that are entered on the Search and the correspond record".

    )

    FROM table WHERE criteria that are entered on the Search form.

     

    As far as I know, sub-queries must be enclosed in parentheses. If only standard functions are used in a Calculated fields, Aggregations work correctly. But if you use additional Selects, parentheses are not used and the whole query is incorrect.

     

    But I am not sure that I understand all these queries and sub-queries correctly. Maybe, some additional security limits are used for Aggregation fields.

     

    Have you written the sub-query that summarize your queries and enter it in the Formula field of an Aggregation?

  10. Hi Elena,

     

    You can try using the following code:

    <script>
    function trim_func()
    {
      var fieldname = "FEILDNAME";
      fieldname = "EditRecord" + fieldname;
      var entered_text = document.getElementById(fieldname).value;
      var n = 1;
      for (i=0;1<100;i++)
      {
        n = entered_text.indexOf("\n\n");
        if(n>-1)
          entered_text = entered_text.replace("\n\n","\n");
        else break;
      }
    document.getElementById(fieldname).value = entered_text;
    }
    document.getElementById("caspioform").onsubmit = trim_func;
    </script>

    You can add a Header&Footer element, select the Footer element, click the Source button and enter the code.

    Please enter the name of your field instead of FEILDNAME.

     

    I hope, it helps.

  11. Hi Elena,

     

    I am sorry for delaying with the answer.

    If I understand correctly, several empty lines are saved in the records. Probably, function can clear spaces but not empty lines that has special symbols for "Enters".

    Maybe, you can use a JavaScript code that deletes the empty lines when a user clicks the button?

    I can try writing the code, if you provide a bit more information:

    - Does the data is displayed as Text or as HTML?

    - Is this text entered on a Submission form or on a Single Update/Details page, or on a Result set?

  12. Hi benyaw616,

     

    Fields also are not displayed, if they are File Fields, Calculated Fields, CAPTCHA, and Distance Search fields, or Smart fields, such as Timestamp and Password.

    You can find more details about limitations of Rules in the article.

     

    I hope, it helps.

×
×
  • Create New...