Jump to content

fangjie

Caspio Guru
  • Posts

    21
  • Joined

  • Last visited

fangjie's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. You can add the following script into the HTML block/Footer: Replace the InsertRecordFIELD_NAME to the appropriate field name. <script> document.getElementById("InsertRecordFIELD_NAME").type = "number"; </script>
  2. Try to put the Javascript code in the Header of your popup page (Submission Form): <script type="text/javascript"> window.onunload = function(){ window.opener.location.reload(); }; </script>
  3. Caspio cascading dropdowns always ask to verify in the Details/Update page. It will populate the old value in the table instead of the real related value from parent dropdown at first. If you only have one related value, and want to select the related value automatically. Here is the solution: 1. Create a Virtual field (id might be "cbParamVirtual1") as a cascading dropdown to receive the value, change the second cascading dropdown (id might be "EditRecordFieldName") to a Text field. 2. Insert the following code to pass the value from Virtual field to Text field. <script> function drop(){ document.getElementById('EditRecordFieldName').value = document.getElementsByName('cbParamVirtual1')[0].value; } document.getElementById("caspioform").onsubmit=drop; </script> 3. Hide the fields if it is needed.
  4. It needs extra JS code. Two main steps: 1. If the checkbox is selected, then save the value in a variable. 2. Combine all the saved values into the real field. For example, there are there Virtual checkboxes, which element id are cbParamVirtual1, cbParamVirtual2, and cbParamVirtual3. When these checkboxes are selected, the selected values will be combined into FieldName and saved in the table after submitting. <SCRIPT LANGUAGE="JavaScript"> //variables save the values from checkboxes var community1 = "", community2 = "", community3 = ""; //when he checkbox is selected, variable is equal to the selected value of checkbox, otherwise variable is blank function com1() { if(document.getElementById("cbParamVirtual1").checked) community1 = document.getElementById("cbParamVirtual1").value; else community1 =""; } function com2() { if(document.getElementById("cbParamVirtual2").checked) community2 = document.getElementById("cbParamVirtual2").value; else community2 =""; } function com3() { if(document.getElementById("cbParamVirtual3").checked) community3 = document.getElementById("cbParamVirtual3").value; else community3 =""; } //whenever the checkbox is clicked, variable value will change. document.getElementById("cbParamVirtual1").onclick= com1; document.getElementById("cbParamVirtual2").onclick= com2; document.getElementById("cbParamVirtual3").onclick= com3; //Combine all the saved values into the real field function concatenate() { document.getElementById("InsertRecordFieldName").value = community1 + " " + community2 + " " + community3; } //click submit button to call Combine function document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT>
  5. I think you only need to change a little. 1. Create a virtual dropdown field which contains "Section1", "Section2", "Section3","Select" 2. Add HTML blocks to surround sections and Create tables to encapsulate the section fields 3.Add the Displayer function to the footer <script language="JavaScript"> function Display() { var sec = document.getElementById('cbParamVirtual1'); var dropdown = sec.options[sec.selectedIndex].value; if (dropdown == 'Select') { document.getElementById('Section1').style.display = 'none'; document.getElementById('Section2').style.display = 'none'; document.getElementById('Section3').style.display = 'none'; } if (dropdown == 'Section1') { document.getElementById('Section1').style.display = 'inline'; document.getElementById('Section2').style.display = 'none'; document.getElementById('Section3').style.display = 'none'; } else if(dropdown == 'Section2') { document.getElementById('Section2').style.display = 'inline'; document.getElementById('Section1').style.display = 'none'; document.getElementById('Section3').style.display = 'none'; } else if(dropdown == 'Section3') { document.getElementById('Section3').style.display = 'inline'; document.getElementById('Section1').style.display = 'none'; document.getElementById('Section2').style.display = 'none'; } } document.getElementById('cbParamVirtual1').onchange = Display; </script>
  6. You can hide the "remove" checkbox in Localization and hide the upload text field by JS code. 1. Delete the "remove" text in the Localizaition. In Setting screen under Forms/Details Pages >> Markers and Tips >>Remove File Label, check "Enable Custom Text" checkbox, and insert <p></p> 2. Hide the upload. Insert code into Header/Footer <script> document.getElementById('EditRecordfileRemove').style.display="none"; if(document.getElementById('EditRecordfile').parentNode.getElementsByTagName("a").length > 0 || document.getElementById('EditRecordfile').parentNode.getElementsByTagName("img").length >0) document.getElementById('EditRecordfile').style.display="none"; </script> Replace "EditRecordfileRemove" and "EditRecordfile" to the appropriate field name
  7. If you would like to insert time into a Capture WebForm DataPage, insert following code <SCRIPT LANGUAGE="JavaScript"> //get current time var cur_time = new Date("[@cb:Timestamp]"); var new_month = cur_time.getMonth() + 2; var new_time; //get new time if (new_month == "13") new_time = ("01" +"/"+cur_time.getDate()+ "/"+(cur_time.getFullYear()+1)); else new_time = ('' + new_month + "/" + cur_time.getDate() + "/" + cur_time.getFullYear()); //insert new time into the field document.getElementById('InsertRecordFieldName').value= new_time; </SCRIPT> If you want to insert time into a Search Report DataPage, replace "InsertRecordFieldName" to "EditRecordFieldName"
  8. The results page is for displaying the records. It is suggested to edit the record in the Details page.
  9. Here is the instruction steps: 1. Create a new Single Record Update DataPage -------- choose the same View as the data source, enable Advanced Options and parameters, -------- check "Find record through unique ID" and insert a unique field of the View, -------- In the Select Field screen, choose any one field for updating, -------- In the Configure screen, create a HTML Block, and insert the previous code for auto submission the update form, -------- In the Destination and Trigger screen, check the Automatic Emails Options checkbox, -------- In the Email Options screen, fill all the fields same as the existing submission form. 2. Edit the existing submission form -------- in the Configure screen, highlight the unique field which you select for updating, click Advance tab, and check "pass this value to next page", -------- in the Destination and Trigger screen, uncheck both Automatic Emails Options checkbox, select "Go to a DataPage" from Destination after submission dropdown box, and then choose the previous Single Record Update DataPage as the destination.
  10. It is a Gallery DataPage. When you create a new DataPage, click on the Reports icon on the left and Gallery on the right. If the image file is stored in the Caspio Bridge, you can create a reference to an image saved in the Files section of Caspio Bridge. Here is the tutorial: http://howto.caspio.com/files-and-images/referencing-an-image-stored-in-caspio-bridge.html. If the image is stored in other server. You can store the image URL wrapped around an img tag in the table. Example: Then include this field in your results page and render it as HTML. Here is the tutorial about rendering a text field plea http://howto.caspio.com/localizations/formatting-and-rendering.html, Rendering Text Fields section.
  11. The auto emails from submission form cannot access the records that are inserted by joins in view at that moment. It can only access the records that are inserted by the forms. Therefore, it will be received blanks instead of respective values. The options for including fields from view in email should not be present. You can create a submission form without auto emails, and link direction after records submitting to a new Update Form. The Update form is based on that View source. Insert JS code below to update the records automatically when page loading. <script> function f_submit() { document.getElementById("caspioform").submit(); } window.onload = f_submit; </script>Please add automatic emails in this Update Form. All the record will show in the receiving mails. Regards,
  12. It is not a standard feature to edit Caspio table by using Access or Filemaker without exporting/importing. However, using Caspio DataHub you can automate movement of data between Caspio online database and other systems. You can find more information about it here at: http://www.caspio.com/extend/platform-extensions/datahub.aspxand http://howto.caspio.com/tables/scheduled-importexport-tasks/ Regards,
  13. It is possible using JavaScript to perform the calculation and store the calculated difference. Here is a JS sample regarding calculations on date/time field http://forums.caspio.com/index.php/topic/3150-js-subtract-two-date-values-and-store-the-difference/. Regards,
×
×
  • Create New...