Jump to content

Watusi

Caspio Ninja
  • Posts

    29
  • Joined

  • Last visited

Posts posted by Watusi

  1.  I got this dialog box in one of my Report DataPage.  

    image.png.b703c045f7ab632872f28fa0c69efeef.png

    I have a dropdown in my search where I used a lookup table as a source. Right now, I just close this dialog box as I am not sure if I should confirm. Also, cannot remember when the pre-existing got generated.

    I cannot find any documentation about this in Caspio's online help center. Anyone who encountered this also?

  2. Thank you, AtayBalunbalunan. This solution works. :)

    18 minutes ago, AtayBalunbalunan said:

    Hi Watusi, if you have just one DataPage deployed in your website page, you can add this script in your DataPage's Footer:

    
    <script type="text/javascript">
    	function submitCBForm() {
    		document.getElementById("caspioform").submit();
    	}
    </script>

    Screenshot_2.png.0f21c97a7d6bf8c4e5ee4931824be61b.png

     

    Then, add onclick="submitCBForm()" in your new Submit button to execute the script for submitting the form.

    Your new button's code can look like this: 

    
    <input type="submit" name="Submit" value="Submit" class="newSBstyle" onclick="submitCBForm()"> 

     

     
  3. I would like to hide the Submit button on my Submission Form and create a new submit button in my website where the DataPage is deployed. I was able to hide the Submit button on my Submission Form by adding an HTML block and using this code:

    <style>
    .cbSubmitButton{
       display: none !important;
    }
    </style>

    Screenshot_1.png.1d90bcc437b1a88f7ce34f83bc0280b0.png

    Meanwhile, on my website, I used the following code for the new Submit button:

    <input type="submit" name="Submit" value="Submit" class="newSBstyle">

     

    Unfortunately, this new Submit button doesn't work. I'm thinking that I'm missing some JavaScript code for my Submission Form to be submitted upon clicking my new Submit button.

    Does anyone know how to do this?

  4. Thank you, AtayBalunbalunan. This works!

    22 minutes ago, AtayBalunbalunan said:

    Hi Watusi, can you try this instead:

    
    <script type="text/javascript">
    
    var dropdown = "Value1_1";
    var checkbox = document.getElementsByName("Value2_1")[0]; 
    var drp = document.getElementsByName(dropdown); 
    
    function checkdropdown()
      {
        var drpselected = drp[0].options[drp[0].selectedIndex].text;
      
        if (drpselected == "Math")
          checkbox.checked = true;
        else
          checkbox.checked = false;
      }
    
      drp[0].onchange=checkdropdown;
    
    </script>

     

    Let me know if this works.

     
  5. I would like to ask for help in my JS code. I'm trying to change the value of a checkbox in a search form when a specific option in a dropdown is selected.
    I want the checkbox to be set to true if "Math" is selected in the dropdown.

    Below is my code that's not currently working:

    <script>
    function checkdropdown(){
      var drpselected = document.getElementsByName("Value1_1").value;
    
      if (drpselected == "Math") {
        document.getElementsByName("Value2_1").checked = true;
      } 
      else {
        document.getElementsByName("Value2_1").checked = false;
      }
    }
    
    document.getElementsByName("Value1_1").onchange = function() {checkdropdown()};
    </script>

     

    Also, here is a screenshot in the "Configure Search Fields" step of the DataPage:

    checkboxjs.png.3315a2e899b14c216027c5c49fb27cb0.png

     

    I'm hoping someone can help me with this. Thank you.

×
×
  • Create New...