Jump to content

Ronan

Members
  • Posts

    9
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Thanks
    Ronan reacted to TsiBiRu in Limit the width of my dropdown   
    Hello Eruel,
     
    You can set or limit the size of your drop down menu by overriding the default css of caspio. You can use the CSS code to do this.
    <style> #InsertRecordSelectionOpt{  width: 900px !important; } .Option { width: 900px !important; overflow:hidden !important; } </style> If the code above will not work, you will need to change the '#InsertRecordSelectionOpt' on the top most part of the code to the name of your dropdown in your DataPage.
    To see that, just do the steps below.
     
    1. Go to the preview of your DataPage
    2. Press F12 on your keyboard, a form should be display. This is the browser developer console
    3. Press Ctrl + Shift + C on your keyboard, then hover over your drop down. You should be able to see its element ID, then click on this .
    4. You should be redirected to its code, just double click the id of this element. Then paste it on the CSS above to update it.
     
    And lastly, you can also increase the size of your dropdown by change the width size. The '#InsertRecord 'is for the width of your drop down, and the '.Option' is for the width of its value or option
     
    Hope this help, if you are having an error making the code above work. Just provide me the URL of your datapage or web page and I will update it for you.
     
    Regards
     
  2. Thanks
    Ronan reacted to TsiBiRu in Additional Image when MAIN Image is clicked   
    Hi @Ronan,
    I have a have a work flow that is just like this, I've contacted support to assist me in implementing this. And they help me formulate a solution for this, to implement this solution kindly follow the steps below.
    Notes: This solution will display 3 additional image when the main image is click.
    1.  On your results page, go to the HTML block that displays your main image and paste the code below. The code below will open another HTML DataPage as a pop-up window, and it will also pass the value/image that we will be displaying as an additional image. 
    <a href="javascript:void(window.open(' https://c5eib829.caspio.com/dp/d90b60006f822a89840c4a60b477?Image1=[@field:Main_Photo/]&amp;Image2=[@field:Photo_2/]&amp;Image3=[@field:Photo_3/]', 'Additional Images', 'width=700,height=550'));"><img alt="" src="[@app:mainImage/]" style="width: 200px; height: 200px; margin: 1px;" /> </a> You can use the code as it is, just update the source of the images to match your images in your table. Refer to this screenshot http://prntscr.com/mde9bg
    2. Create a new HTML DataPage and just paste the code below, you can use it as it is https://prnt.sc/mdec50.
    <style> * {box-sizing: border-box} body {font-family: Verdana, sans-serif; margin:0} .mySlides {display: none} img {vertical-align: middle;} /* Slideshow container */ .slideshow-container { max-width: 1000px; position: relative; margin: auto; } /* Next & previous buttons */ .prev, .next { cursor: pointer; position: absolute; top: 50%; width: auto; padding: 16px; margin-top: -22px; color: white; font-weight: bold; font-size: 18px; transition: 0.6s ease; border-radius: 0 3px 3px 0; user-select: none; } /* Position the "next button" to the right */ .next { right: 0; border-radius: 3px 0 0 3px; } /* On hover, add a black background color with a little bit see-through */ .prev:hover, .next:hover { background-color: rgba(0,0,0,0.8); } /* Number text (1/3 etc) */ .numbertext { color: #f2f2f2; font-size: 12px; padding: 8px 12px; position: absolute; top: 0; } /* The dots/bullets/indicators */ .dot { cursor: pointer; height: 15px; width: 15px; margin: 0 2px; background-color: #bbb; border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; } .active, .dot:hover { background-color: #717171; } /* Fading animation */ .fade { -webkit-animation-name: fade; -webkit-animation-duration: 1.5s; animation-name: fade; animation-duration: 1.5s; } @-webkit-keyframes fade { from {opacity: .4} to {opacity: 1} } @keyframes fade { from {opacity: .4} to {opacity: 1} } /* On smaller screens, decrease text size */ @media only screen and (max-width: 300px) { .prev, .next,.text {font-size: 11px} } </style> </head> <body> <div class="slideshow-container"> <!-- Update the source of the Images ************************************* --> <div class="mySlides fade"> <div class="numbertext">1 / 3</div> <img src="[@Image1/]" style="width:100%"> </div> <div class="mySlides fade"> <div class="numbertext">2 / 3</div> <img src="[@Image2/]" style="width:100%"> </div> <div class="mySlides fade"> <div class="numbertext">3 / 3</div> <img src="[@Image3]" style="width:100%"> <!-- Update the source of the Images ************************************* --> </div> <a class="prev" onclick="plusSlides(-1)">&#10094;</a> <a class="next" onclick="plusSlides(1)">&#10095;</a> </div> <br> <div style="text-align:center"> <span class="dot" onclick="currentSlide(1)"></span> <span class="dot" onclick="currentSlide(2)"></span> <span class="dot" onclick="currentSlide(3)"></span> </div> <script> var slideIndex = 1; showSlides(slideIndex); function plusSlides(n) { showSlides(slideIndex += n); } function currentSlide(n) { showSlides(slideIndex = n); } function showSlides(n) { var i; var slides = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("dot"); if (n > slides.length) {slideIndex = 1} if (n < 1) {slideIndex = slides.length} for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } for (i = 0; i < dots.length; i++) { dots[i].className = dots[i].className.replace(" active", ""); } slides[slideIndex-1].style.display = "block"; dots[slideIndex-1].className += " active"; } </script> 3. Deploy as URL the HTML DataPage that we just created, copy the deployed URL and update the deployed URL in our code in step 1.
    That should do it, this solution is working well on my end. If you encounter any issue implementing it, just reply to this thread so that I can help you in implementing this workflow.
    I hope this helps.
    Regards,
    TsiBiRu
  3. Thanks
    Ronan got a reaction from DefinitelyNot31337 in Auto Focus After Ajax Refresh   
    Thank you @DefinitelyNot3133,
    Your solution work splendidly, have a great day! 
  4. Thanks
    Ronan reacted to TsiBiRu in Form Validation, at least one field has value   
    Hello Azriel.
     
    I have similar validation in my App, I have used the JavaScript below to implement this validation.
    <script type= "text/javascript" > var input1 = document.querySelector('#InsertRecordValue1'); var input2 = document.querySelector('#InsertRecordValue2'); var input3 = document.querySelector('#InsertRecordValue3'); var input4 = document.querySelector('#InsertRecordValue4'); document.querySelector('#caspioform').onsubmit = function(e) {     e.preventDefault(); if (input1.value.length > 0){ this.submit(); } else if (input2.value.length > 0){ this.submit(); } else if (input3.value.length > 0){ this.submit(); } else if (input4.value.length > 0){ this.submit(); } else { alert('Please fill at least one field to continue'); input.focus(); } } </script> If the code above will not work, you will need to change the '#InsertRecordValue' on the top most part of the code to the name of your field in your DataPage.
    To see that, just do the steps below.
     
    1. Go to the preview of your DataPage
    2. Press F12 on your keyboard, a form should be display. This is the browser developer console
    3. Press Ctrl + Shift + C on your keyboard, then hover over your text field. You should be able to see its element ID, then click on this field.
    4. You should be redirected to its code, just double click the id of this element. Then paste it on the JavaScript above to update it.
     
     
    Hope this help, if you are having an error making the code above work. Just provide me the URL of your datapage or web page and I will update it for you
     
    Regards
     
×
×
  • Create New...