Option to remove 'start' address with the Driving distance widget

  • Profile Image
    Hinse
    Asked on June 01, 2021 at 12:32 PM

    Hello!

    I'm making an form for catering, that people can order an price, for that I need the distance between there address (where the party is) and my address.
    I fixed that with the driving distance widget, but the problem is that can erase the start address.. So when I don't check this every time, they can manipulate the price off there party.

    and also it looks wrong..

    Image to explain:

    1622565116_60b660fc66eb1_Schermafbeeldin


  • Profile Image
    nibojczuk
    Answered on June 01, 2021 at 03:46 PM

    Hi Hinse,

    You can add a custom CSS to your widget and block the From input field.

    Please add the following CSS code in the Widget Settings:

    1622575773_60b68a9d0748d_


    You can see it working here:

    https://form.jotform.com/211425673028048

    You could also hide the "From" Field entirely by instead adding:

    #addFrom {display:none;} to the custom CSS.


    Regarding the looks of your widget,

    I will soon send you a custom CSS to add to your widget in order to make it look consistently with your form.


    Best,

    Igor


  • Profile Image
    nibojczuk
    Answered on June 01, 2021 at 05:27 PM

    Hi Hinse,


    The following custom CSS should make the widget look consistently with your form. I have hid the "From Field" as you requested in your question.



    #ddFrom {

    display: none;

    }

    #ddTo {

    padding: 0 10px;

     width: calc(100% - 14px);

     border-radius: 4px;

     border: 1px solid #c3cad8;;

     height: 40px;

     font-size: 1em;

    }

    #ddTo:focus {

    border-color:#2e69ff;

    box-shadow:0 0 0 3px #c9d8fe;

    outline:none;

    }

    iframe {

    max-width:50%;

    }

    You can see the code in action here:

    https://form.jotform.com/211425673028048


    Please let me know if you have any other questions and if the code above works for you.


    Best,

    Igor


  • Profile Image
    Hinse
    Answered on June 02, 2021 at 01:48 AM

    This is the perfect solution!

    Thank you for that, Igor!