Jump to content

caspio

Administrators
  • Content Count

    54
  • Joined

  • Last visited

  • Days Won

    53

caspio last won the day on February 7 2019

caspio had the most liked content!

1 Follower

About caspio

  • Rank
    Site Admin

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. New to the system and trying to learn all the different javascript handles and how to call them properly.  If there is any info out there please let me know.

     

    Thank you

    1. svitlanataran

      svitlanataran

      Hello,

      You may have a look at our Java Script solutions in the following section:

      https://forums.caspio.com/index.php?/forum/49-caspio-javascript-solutions/

  2. posted this matter on the forums and no respond.
    using HTML block would like to show values for some fields as images (like a check mark) and so on.... The script I have, responds nicely for the first 2 data fields and then doesn't function further! Also, would like the fields NOT to appear at all, if the value is blank.
    Script, I am using:

    <span  style="color: #A1A1A1;
        font-size: 12px;
        font-family: Arial, sans-serif;
        font-style: normal;
        font-weight: normal;">21+</span>

    <span id="icon[@field:age]"></span>
    <script>

    if ("[@field:age]" == "No1"){
    document.getElementById('icon[@field:age]').innerHTML="<img width='15px' src='http://someapp.com/nk/icons/yellowflag.png'/>";
    } else if ("[@field:age]" == "Yes1"){
    document.getElementById('icon[@field:age]').innerHTML="<img width='15px' src='http://assets.goplaypool.com/files/theme/appcas/check_01.png'/>";

    </script>

    <span  style="color: #A1A1A1;
        font-size: 12px;
        font-family: Arial, sans-serif;
        font-style: normal;
        font-weight: normal;">Tournaments</span>

    <span id="icon[@field:tourneys]"></span>
    <script>

    if ("[@field:tourneys]" == "No2"){
    document.getElementById('icon[@field:tourneys]').innerHTML="<img width='15px' src='http://someapp.com/nk/icons/yellowflag.png'/>";
    } else if ("[@field:tourneys]" == "Yes2"){
    document.getElementById('icon[@field:tourneys]').innerHTML="<img width='15px' src='http://assets.goplaypool.com/files/theme/appcas/check_01.png'/>";

    </script>

    <span  style="color: #A1A1A1;
        font-size: 12px;
        font-family: Arial, sans-serif;
        font-style: normal;
        font-weight: normal;">Leagues</span>

    <span id="icon[@field:leagues]"></span>
    <script>

    if ("[@field:leagues]" == "No3"){
    document.getElementById('icon[@field:leagues]').innerHTML="<img width='15px' src='http://someapp.com/nk/icons/yellowflag.png'/>";
    } else if ("[@field:leagues]" == "Yes3"){
    document.getElementById('icon[@field:leagues]').innerHTML="<img width='15px' src='http://assets.goplaypool.com/files/theme/appcas/check_01.png'/>";

    </script>

     

    Thank you in advance! :)

  3. JavaScript Solution: Adding a Digital Signature to a Submission Form Feature Description: This JavaScript solution shows how to add a digital signature to a Submission form, Update form, and Details form. It also shows how to display the signature in Details and Results page of a Report. The signature pad is compatible with mobile devices as well. Note: This is a simple capture and displays a signature solution. It is not designed to replace a professional e-signature solution like DocuSign that assures security, legal, and visibility of all transactions with a complete audit tr
  4. JavaScript Tips: Caspio Form Elements JavaScript is a client-side scripting language that is commonly used in HTML pages. JavaScript can be used in Caspio Bridge DataPages to extend capabilities outside the standard features. This page provides a guideline for referencing Caspio form elements using JavaScript. It is an advanced topic and you should have prior knowledge of JavaScript programming. Referencing Caspio Form Elements A common way to access a form element using JavaScript is by referencing the element's ID attribute using: - document.getElementById("id")
  5. JavaScript Solution: Select multiple values from a listbox in an Update DataPage Feature Description: This JavaScript solution shows how to enable the selection of multiple values using a listbox form element in an Update or Details DataPage. When the DataPage is submitted, the values selected in the listbox are stored in the table as a comma-separated string. For example: A field named state in a table contains US states. If three states California, Nevada and Oregon are selected in this listbox, the value stored in that field will be "California, Nevada, Oregon".
  6. JavaScript Solution: Auto-Submit a DataPage Feature Description: This JavaScript solution shows how to auto-submit a DataPage. Caspio DataPage only submits to one table so if you need to perform submission to multiple tables you can use another DataPage and the following JavaScript to auto submit. Implementation: This solution can be used "as-is", without any changes if a. It is used in a Submission, Single Record Update, or Details DataPage and b. The DataPage is the only one Caspio DataPage deployed on your web page. c. The "progress_bar" image exists on your site: www.yo
  7. JavaScript Solution: Format phone number Feature Description: This JavaScript solution shows how to format an entered phone number as (XXX)-XXX-XXXX in a Submission Form. Implementation: This solution can be used "as-is", without any changes if a. It is used in a Submission Form DataPage. b. There is a text field in the table called "Phone". To use this solution copy and paste the code below, inside the HTML Footer section of the Form using the Caspio Bridge DataPage Wizard. <SCRIPT LANGUAGE="JavaScript"> var arrEl = Array.from(document.querySelec
  8. JavaScript Solution: Show/Hide a custom link on results page based on a Yes/No field Feature Description: This JavaScript solution shows how to display or hide a custom link in HTML block on a results page of a Search and Report DataPage based on the value of a Yes/No field. A typical example is, to only display the custom "details" link if the field value "Yes". Implementation: This solution can be used "as-is", without any changes if a. It is used on a results page of a Search and Report DataPage. b. There is a Yes/No field named Approved in the table. To u
  9. JavaScript Solution: Change tab order of fields on a Submission Form Feature Description: Tab index defines the order in which form elements will receive focus when navigated by the user via the keyboard. This JavaScript solution shows how to change tab order in a Submission Form fields. This is usually used for a multi-column form. A typical situation is, on a two-column form with "Top to bottom" fill order, you would like to change the tab index order from "Left to right" to "Top to bottom". Implementation: This solution can be used "as-is", without any changes if a. It is used in
  10. JavaScript Solution: Concatenate/Combine two fields into one field Feature Description: This JavaScript solution shows how to perform a function in a Submission Form to combine two fields' values and put them into another field. Values entered in two fields "Position1" and"Position2" are concatenated and the result is stored in the field "AllPositions" upon submission. Implementation: This solution can be used "as-is", without any changes if a. It is used in a Submission Form DataPage and b. The fields Position1, Position2, and AllPositions exist in your table and the form. c. The
  11. JavaScript Solution: Calculate the sum of a column values in the result page Feature Description: This JavaScript solution shows how to perform the sum of all elements of column in a result page. The result is displayed in a row below the last record. For example, if the results have 3 records, and the values in a specific column are 12.00, 25.20, and 45.65, the sum (82.85) will be shown in a row below the last record. Implementation: This solution can be used "as-is", without any changes if a. It is used in a Search and Report DataPage b. The results page has 5 columns c. It calculat
  12. JavaScript Solution: Prevent blank entries from displaying in a dropdown form element Feature Description: This JavaScript solution shows how to prevent blank "Text" entries from displaying in a dropdown form element of a Search form in a Search and Report DataPage. Typically, when a dropdown form element is configured in Caspio Bridge to use a Lookup table/view, a lookup table and field are selected. The selected field may be populated by a user through another DataPage such as a WebForm. For example, assume that a user is expected to fill in the value for a City field in a Web
  13. JavaScript Solution: Disable fields conditionally in the search page Feature Description: This JavaScript solution shows how to disable a Dropdown Form Element based on a selection made in another dropdown element. This solution can be used on the Search page of a Search and Report DataPage. For example, assume that a search form contains three fields, Country, State and City where Country and State are Dropdown form elements and City is a Text Field. If the country selected in the Country dropdown is not "United States", the State dropdown element is disabled. This prevents a u
  14. JavaScript Solution: Format tabular display on result page in four different ways Feature Description: This JavaScript solution shows how to format the Results page of a Search and Report DataPage in four different ways. For ease of reference, these formats are referred to as Type A, Type B, Type C and Type D respectively. The details are: a. Type A: Individual column - Background color b. Type B: Individual column - Font weight c. Type C: Individual row - Font weight d. Type D: Individual column - Conditionally format background color Features in this solution that can be easily
  15. JavaScript Solution: Subtract two date values to obtain the number of years the dates differ Feature Description: This JavaScript solution shows how to perform date arithmetic in a Submission Form. Two date values entered into fields of a form are subtracted to return the number of years by which they differ. The result is stored in another field in the same Submission Form. This calculation is performed when the DataPage is submitted by the user. Implementation: This solution can be used "as-is", without any changes if a. It is used in an Submission Form DataPage and b. The two
×
×
  • Create New...