Jump to content

Jan

Caspio Evangelist
  • Posts

    635
  • Joined

  • Last visited

  • Days Won

    33

Reputation Activity

  1. Like
    Jan got a reaction from kpcollier in Conditional Autonumber   
    Hi Sergio,
     
    I am sorry for delayed response.
     
    You can try doing the following steps:
     
    For example, names of Fields:
    Id - the name of "ID" field;
    "Project" - the field with name of "Project", if you use this field;
    "UniqueReference" - the field for Unique Reference.
     
    1) Create a Single Update Form:
    1a) On the "Record Identification" step, in the field "Parameter name:" enter like:
    [@InsertRecordID]
    1b) On the "Select Fields" step, select your "Project" and "UniqueReference" field (if "Project" is used);
    1c) On the "Configure Fields" step
    1c*) Set "TextField" Form element for "Project" and "UniqueReference" fields;
    1c**) Add a Header&Footer element, select the Header element, click the "Source' button" enter the following code:
     
    <div align="center"> <p>Processing...</p> <img src="images/progress_bar.gif" alt="Progress Bar" width="200" height="15" /> </div>
     
    1c***) Select the Footer, click the "Source" button and enter the code like following:
     
    <SCRIPT LANGUAGE="JavaScript">
    var position1 = document.getElementById("EditRecordProject").value;
    var position2 = "[@InsertRecordID]";

    var allpositions = "IR-" + position1 + "-" + position2;

    document.getElementById("EditRecordUniqueReference").value = allpositions;

    if(document.getElementById("caspioform")) {
    document.getElementById("caspioform").style.display = 'none';
    setTimeout('document.forms["caspioform"].submit()',1000); }
    </SCRIPT>
     
    If you do not use the "Project" field, you can use the following code:
     
    <SCRIPT LANGUAGE="JavaScript">
    var position2 = "[@InsertRecordID]";
     
    var allpositions = "IR-ProjectName-" + position2;
    document.getElementById("EditRecordUniqueReference").value = allpositions;

    if(document.getElementById("caspioform")) {
    document.getElementById("caspioform").style.display = 'none';
    setTimeout('document.forms["caspioform"].submit()',1000); }
    </SCRIPT>
     
    I have marked names of fields. Please make sure that you enter names of your fields.
     
    2) Edit your Submission Form.
    2a) On the "Select Fields" step, check the "On exit, pass AutoNumber ID field as parameter" checkbox. It is under the "Available fields" section.
    2b) On the "Destination and Emails" step, select
    - if you use Embed Deployment: "Go to a new page" and enter the URL of the page where the DataPage from step 1 is deployed;
    - if you use iFrame or URL Deployment: "Go to a new DataPage" and select your DataPage.
     
    Now, when a new record is added, the Autonumber is passed as parameter to Single Update Form. On this form Unique Reference is created, entered to the field, and the form is autosubmitted. A user sees "Process" instead of the Single Update Form.
     
    I hope, it helps.
     
    Fell free to ask, if anything is unclear.
  2. Like
    Jan got a reaction from DesiLogi in Email Trigger Of Multiple Records   
    Hello everyone,
     
    I have found a solution, but it requires additional steps.
     
    Select the field with id or with any unique value, on the Advanced tab, select the Pass field value as parameter checkbox and copy the name of the parameter (for example, "[@id]"). Add a Virtual field, select the Hidden Form element, select the External Parameters "On load, receive", paste the name of the parameter from step 1 (for example, "[@id]"). Add the second Virtual field, select the Hidden Form element, select the Data Source Field "On load, receive", select the field with id or with any unique value, the field from step 1. Add the Header&Footer element, select the Footer element, click the Source button and enter the following script: <script type="text/javascript"> if(document.getElementById("caspioform")) { if(document.getElementById("cbParamVirtual1").value==document.getElementById("cbParamVirtual2").value)   {           document.getElementById("caspioform").style.visibility = 'hidden';      document.write('<font face="arial" color=red size="5">Email Notifications have been Sent!');        } else   setTimeout('document.forms["caspioform"].submit()',1000); } </script> I hope, it works. And it is not too complex
  3. Like
    Jan got a reaction from DesiLogi in Email Trigger Of Multiple Records   
    Maybe, it is possible to merge both scripts (and three steps, that allow do not click the last record more than once):
    <script type="text/javascript"> if(document.getElementById("caspioform")) { if(document.getElementById("cbParamVirtual1").value==document.getElementById("cbParamVirtual2").value)   {           document.getElementById("caspioform").style.visibility = 'hidden';      document.write('<font face="arial" color=red size="5">Email Notifications have been Sent!');        } else   {     if("[@field:text]" == "105") { setTimeout('document.forms["caspioform"].submit()',1000); }     else       {          var v_link = document.getElementsByName("JumpToNext")[0];          if(v_link){ v_link.click(); }        }    } } </script> I hope, it helps.
  4. Like
    Jan got a reaction from Medron in Digital Signature - Signature Pad On Submission Form   
    Hi,
     
    Please make sure that all the following steps are done:
     
    a. Copy the code below and paste inside the <head> section of your web page:
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> b. Download the JavaScript file from here and upload the file to your website hosting. Once uploaded, you’ll need to reference this file in the <head> section of your web page.
    Example:
    <script src="http://yoursite.com/yourfolder/jquery.signaturepad.min.js"></script> c. Edit the Details page of the DataPage and choose form element "hidden" for "Signature" field in the Configure Fields screen. Insert an HTML Block after the "Signature" field. Go to the Source of the HTML Block and insert the following code.
    <div class="sigPad signed"> <div class="sigWrapper"> <canvas height="55" width="198" class="pad"></canvas></div> </div> <script> var sig = eval("[@field:Signature]".replace(/"/g, '"')); $(document).ready(function () { $('.sigPad').signaturePad({displayOnly:true}).regenerate(sig); }); </script> d. Insert Header & Footer using the picker button at the lower right of the DataPage Elements. Disable HTML editor for both Header and Footer from the Advanced tab. Copy the code below and paste inside the HTML Header.
    <div id="cb_sign_wrapper"> e. Copy the code below and paste inside the HTML Footer.
    </div> I hope, it helps.
  5. Like
    Jan got a reaction from KenColcreate in Hide Calculated Field Value From Details Page   
    Hello Thor,
     
    You can use conditional-forms.
     
    Put the Calculated field in a separate Section (I made my field the last and create a Section that contains only one field).
    Add a Rule, add a criteria that is always true (e.g., Value 1 equal Value 1), and add an action that hides the Section.
     
    You can read more details in the article in How To:
    http://howto.caspio.com/datapages/forms/conditional-forms/
  6. Thanks
    Jan got a reaction from johndavis50 in Autocomplete Problem   
    Hello jgorny,
     
    Welcome to Caspio forum!
     
    If I understand correctly, it is possible, but it requires several steps:
    Add a Virtual field, select Autocomplete form element, select your table and the Text field. Select your field, select any cascading form element, for example Cascading Text Field. Select the Virtual field in the Parent field; Select the same Lookup table; Select the Text field in Filter cascade by; Select the ID field in the Field for value. Hide the field with a Rule.  
    Does it work for you?
     
    Also you can use a Dropdown Form element instead of AutoComplete.
  7. Like
    Jan got a reaction from lmooring in Calendar - Make Start Date 2 Days After Current (Today's) Date   
    Hello themonitor,
     
    I think, you can use the following code:
     
    <SCRIPT LANGUAGE="JavaScript"> function check_date() { var entered_value = document.getElementById("InsertRecordfirst").value; var entered_date = new Date(entered_value); var tomorrow = new Date(); tomorrow.setDate(tomorrow.getDate() + 1); if(entered_date < tomorrow)    {       alert("Please select a date after tomorrow");       return false;    } var entered_value2 = document.getElementById("InsertRecordsecond").value; if (entered_value2 !="") { var entered_date2 = new Date(entered_value2); if(entered_date2 < tomorrow)    {       alert("Please select a date2 after tomorrow");       return false;    } } var entered_value3 = document.getElementById("InsertRecordthird").value; if (entered_value3 !="") { var entered_date3 = new Date(entered_value3); if(entered_date3 < tomorrow)    {       alert("Please select a date3 after tomorrow");       return false;    } } } document.getElementById("caspioform").onsubmit=check_date; </SCRIPT> Please insert your fieldnames instead of first, second, third.
     
    I hope, it helps.
  8. Like
    Jan got a reaction from MAmbrose in time stamp field based on selection in drop down?   
    Hi iren,
     
    You can create a Virtual field and select Hidden Form element. In Field Options of the Virtual field, select Data Source Fields and your field (for example, Status). This Virtual field will "remember" the initial value of the field.
     
    Then add a Header&Footer element, select Footer, click Source and enter the following code:
    <script type= "text/javascript"> function getT()  { if(document.getElementById("EditRecordStatus").value != document.getElementById("cbParamVirtual1").value)  {    document.getElementById("EditRecordTime_edited").value = '[@cb:Timestamp]';   } } document.getElementById("caspioform").onsubmit = getT; </script> Enter names of your fields instead of Status and Time_edited and change the number of the Virtual field in cbParamVirtual1, if the added Virtual field is not the first. Also make the Time_edited field hidden in the details/update form because you don't want user to be able to update it.
     
    I hope, it helps.
  9. Like
    Jan got a reaction from TWIRED in Js: Checkboxes For Multi-Optioned Entries   
    Hello IPV,
     
    Welcome to Caspio forum!
     
    If I understand correctly, you have one field that stores values.
    So, you can
    Select the Hidden FormElement for the field that stores values. Add a Virtual field, select the "Checkbox" element and enter your values, for example, "Math", to "Display Text" and "Value when checked" fields. Add as many virtual fields as you want. Add Header&Footer element, select the Footer element, click the Source button and enter the following script:
    (please enter the name of your field that stores values instead of "text"; enter the numbers of first and last Virtual fields in the group of checkboxes, in my case the first one is VirtualField1 and the last one is VirtualField3) <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var Resultfieldname = "text"; var firstVirtual = 1; var lastVirtual = 3; var ResultString = ""; var virtualFieldName = ""; for (i=firstVirtual ;i<=lastVirtual; i++) { virtualFieldName = "cbParamVirtual"+i; if (document.getElementById(virtualFieldName).checked) ResultString = ResultString + "," + document.getElementById(virtualFieldName).value; } Resultfieldname = "InsertRecord"+Resultfieldname; if (ResultString.length>0) ResultString = ResultString.substr(1); document.getElementById(Resultfieldname ).value = ResultString; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> If you have more than one block, you can add blocks like:
    (please enter the name of your second field that stores values instead of "new"; enter the numbers of first and last Virtual fields in the second group of checkboxes, in my case the first one is VirtualField4 and the last one is VirtualField6)
    Resultfieldname = "new"; firstVirtual = 4; lastVirtual = 6; ResultString = ""; virtualFieldName = ""; for (i=firstVirtual ;i<=lastVirtual; i++) { virtualFieldName = "cbParamVirtual"+i; if (document.getElementById(virtualFieldName).checked) ResultString = ResultString + "," + document.getElementById(virtualFieldName).value; } Resultfieldname = "InsertRecord"+Resultfieldname; if (ResultString.length>0) ResultString = ResultString.substr(1); document.getElementById(Resultfieldname ).value = ResultString; Then the whole script will be like:
    <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var Resultfieldname = "text"; var firstVirtual = 1; var lastVirtual = 3; var ResultString = ""; var virtualFieldName = ""; for (i=firstVirtual ;i<=lastVirtual; i++) { virtualFieldName = "cbParamVirtual"+i; if (document.getElementById(virtualFieldName).checked) ResultString = ResultString + "," + document.getElementById(virtualFieldName).value; } Resultfieldname = "InsertRecord"+Resultfieldname; if (ResultString.length>0) ResultString = ResultString.substr(1); document.getElementById(Resultfieldname ).value = ResultString; //second block Resultfieldname = "new"; firstVirtual = 4; lastVirtual = 6; ResultString = ""; virtualFieldName = ""; for (i=firstVirtual ;i<=lastVirtual; i++) { virtualFieldName = "cbParamVirtual"+i; if (document.getElementById(virtualFieldName).checked) ResultString = ResultString + "," + document.getElementById(virtualFieldName).value; } Resultfieldname = "InsertRecord"+Resultfieldname; if (ResultString.length>0) ResultString = ResultString.substr(1); document.getElementById(Resultfieldname ).value = ResultString; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> I hope, it helps.
    Please feel free to ask if anything is unclear.
  10. Like
    Jan got a reaction from JulienMoulis in Tabular Report Dropdown Look Up Show Up Display Field Instead Of Value   
    Hi jules,
     
    Welcome to Caspio forum!
     
    As far as I know, you can use a View.
    You can create a View that uses both tables, and in your Report DataPage display the Name of an employee from the second table.
     
    I hope, it helps.
  11. Like
    Jan got a reaction from lmooring in Enable multiple selection for listbox with virtual fields   
    Hi Rael,
     
    I think, you can double the code for all listboxes, like:
    <script type="text/javascript">    var fieldName = "cbParamVirtual1"; var fieldName2 = "cbParamVirtual21";    var x1=document.getElementsByName(fieldName); var x2=document.getElementsByName(fieldName2);    x1[0].multiple=true; x2[0].multiple=true; function splitAndParse() { var result = ""; var result2 = ""; var cleanResult = ""; var cleanResult2 = ""; for (var i = 0; i < x1[0].length; i++) { if (x1[0].options[i].selected) { result += "\""+x1[0].options[i].value+"\"" + " OR " ; } } if (x1[0].length > 4) { cleanResult = result.substring(0,(result.length-4)); } document.getElementById("cbParamVirtual2").value = cleanResult; for (var i = 0; i < x2[0].length; i++) { if (x2[0].options[i].selected) { result += "\""+x2[0].options[i].value+"\"" + " OR " ; } }  if (x2[0].length > 4) { cleanResult2 = result2.substring(0,(result2.length-4)); } document.getElementById("cbParamVirtual22").value = cleanResult2; } document.getElementById("caspioform").onsubmit=splitAndParse; </script> I have added the second one, but you can add as many listboxes as you want.
  12. Like
    Jan reacted to jhanajc in Hide 'Submit' button   
    Yes I was able to hide the entire submission form using the same method.
  13. Like
    Jan got a reaction from FrankB in Custom Js For Showing "record 1 Of 1" On A Details Page   
    Hello Frank,
     
    Welcome to the forum!
     
    I have written the following script. You can add a Header&Footer element, select the Footer element, click the Source button and paste the code:
    <script> var myTables = document.getElementsByTagName("table"); var onlyOneRecord = true; var navTable = ""; for (i=0; i<myTables.length;i++) { navTable = myTables[i].getAttribute("data-cb-name"); if((navTable=="cbFormNavigationTableTop")||(navTable=="cbFormNavigationTableBottom")) onlyOneRecord = false; } if (onlyOneRecord) document.write('<center><span class="cbFormNavigationCell cbFormNavigationMessage">Record 1 of 1</span></center>'); </script> You can change the code <center><span class="cbFormNavigationCell cbFormNavigationMessage">Record 1 of 1</span></center> as you want.
     
    I hope, it helps.
  14. Like
    Jan reacted to LWSChad in Acknowledgement Email Multiple Emails Via Parameters   
    Try a Notification email rather than an Acknowledgement
  15. Like
    Jan reacted to LWSChad 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.
  16. Like
    Jan reacted to LWSChad in Hide A Submitbutton In The Header.   
    It looks like you have an extra closed bracket, but also try...
     1. Drop dropping in some alerts throughout to see where it's breaking.
     2. I recommend style.display = 'none' over style.visibility = 'hidden'
     
     
     
    <SCRIPT LANGUAGE="JavaScript">
    alert('Hi - test1');
    var eigenaar='[@s_id]';
    alert(eigenaar);
    var aanmaker='[@authfield:user_tabel_user_id]';
    alert(aanmaker);
    }
    if (eigenaar!=aanmaker)
    {
    alert('Not equal!');
      document.getElementById("Voeg_toe").style.visibility = 'hidden';
    alert('Visibility set to hidden. Is it hidden?');
       }
    </script>
  17. Like
    Jan got a reaction from snpe60 in Browser Compatibility Problem   
    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.
  18. Like
    Jan reacted to joristhielemans in Wanted To Share This Third Party Pdf Generator   
    Hi All, I have used both pdf methods (pdfcrowd and caspio generator) and am very pleased with both. Pdf crowd is nice for "open" datapages but not if there's an authentication. I used a generated autovalue to work around this problem, but there has to be an action to generate it somewhere in the proces. So it works and I was happy to use it. 
     
    Nowadays we have a bigger plan with caspio and I have the generator. It sort of works the same (via link), but now for everything and I have support for questions. Ultimately a much better solution and very happy to get it.  
     
    Pdf crowd however worked fine for me and my customers and I'm glad I had a pdf solution.
  19. Like
    Jan reacted to DesiLogi in How To Find Subdomain To Connect With Zapier? (Not Where It's Supposed To Be)   
    I found it- it's the in the first part of the deploy code of a datapage, before AppKey, if anyone needs it. 
  20. Like
    Jan got a reaction from derekcaldwell in Calculations In Sumission Forms   
    Hello Parma2015,
     
    I am afraid, I do not have a qualification answer, but I have a proposition
    The idea to add a Calculated fields to Web Forms has 36 votes now.
    You can vote for the idea, and when many users vote, I believe, this feature will be added.
  21. Like
    Jan reacted to Carlson in Check Field For Email Domain   
    Jan,
     
    I was able to modify the script to check full email domain not just the ending (.com, .net, etc). In this instance I want to make sure users only type an internal company email address and not external (yahoo, hotmail, etc).  I have checked and this script is working correctly. Thanks for your help!
     
     
    <SCRIPT LANGUAGE="JavaScript">
     
    function check_Domain()
    {
      var correct_domain = "companyname.com";
      var field_name = "UserEmailAddress";
      field_name = "InsertRecord" + field_name;
      var text_email = document.getElementById(field_name).value;
      if (text_email.length>0)
      {
        var last_point = text_email.lastIndexOf("@");
        if (last_point > 3)
        {
          var text_domain = text_email.slice(last_point+1);
          if (text_domain.toLowerCase()!=correct_domain.toLowerCase())
           {
            alert("You must enter an email address ending with companyname.com.");
            return false;
           }
         }
        else 
        {
          alert("You must enter an email address ending with companyname.com.");
          return false;
         }
      }
    }
     
    document.getElementById("caspioform").onsubmit=check_Domain;
    </SCRIPT>
  22. Like
    Jan got a reaction from LWSChad in Email Trigger Of Multiple Records   
    Hello everyone,
     
    I have found a solution, but it requires additional steps.
     
    Select the field with id or with any unique value, on the Advanced tab, select the Pass field value as parameter checkbox and copy the name of the parameter (for example, "[@id]"). Add a Virtual field, select the Hidden Form element, select the External Parameters "On load, receive", paste the name of the parameter from step 1 (for example, "[@id]"). Add the second Virtual field, select the Hidden Form element, select the Data Source Field "On load, receive", select the field with id or with any unique value, the field from step 1. Add the Header&Footer element, select the Footer element, click the Source button and enter the following script: <script type="text/javascript"> if(document.getElementById("caspioform")) { if(document.getElementById("cbParamVirtual1").value==document.getElementById("cbParamVirtual2").value)   {           document.getElementById("caspioform").style.visibility = 'hidden';      document.write('<font face="arial" color=red size="5">Email Notifications have been Sent!');        } else   setTimeout('document.forms["caspioform"].submit()',1000); } </script> I hope, it works. And it is not too complex
  23. Like
    Jan got a reaction from menathansmith in Email Trigger Of Multiple Records   
    Hi aam82,
     
    I am afraid, my solution (all steps, not only the script) replaces Aurora's.
  24. Like
    Jan got a reaction from menathansmith in Email Trigger Of Multiple Records   
    Hello everyone,
     
    I have found a solution, but it requires additional steps.
     
    Select the field with id or with any unique value, on the Advanced tab, select the Pass field value as parameter checkbox and copy the name of the parameter (for example, "[@id]"). Add a Virtual field, select the Hidden Form element, select the External Parameters "On load, receive", paste the name of the parameter from step 1 (for example, "[@id]"). Add the second Virtual field, select the Hidden Form element, select the Data Source Field "On load, receive", select the field with id or with any unique value, the field from step 1. Add the Header&Footer element, select the Footer element, click the Source button and enter the following script: <script type="text/javascript"> if(document.getElementById("caspioform")) { if(document.getElementById("cbParamVirtual1").value==document.getElementById("cbParamVirtual2").value)   {           document.getElementById("caspioform").style.visibility = 'hidden';      document.write('<font face="arial" color=red size="5">Email Notifications have been Sent!');        } else   setTimeout('document.forms["caspioform"].submit()',1000); } </script> I hope, it works. And it is not too complex
  25. Like
    Jan got a reaction from sixlevel in If Statement In Detail Report   
    Hi MostlyJava,
     
    As far as I know, the InsertRecord prefix is used on Submission Forms, on Details and Single Update Forms the EditRecord prefis is used.
    You can change the Id InsertRecordPalmas to EditRecordPalmas.
     
    You can find more details about names etc. in a guideline for referencing Caspio form elements using JavaScript.
     
    I hope, it helps!
×
×
  • Create New...