Injected CSS code using Form Designer did not work

  • KriyaYogaVienna
    Asked on January 13, 2015 at 10:01 PM

    The css code does not work.

    .form-line.calculatedOperand {
        -webkit-user-select : none;
        -moz-user-select : none;
        -ms-user-select : none;
        -o-user-select : none;
        user-select : none;
    }

     

    I suppose because I used the Designer a little. It added a LOT of code to my Inject Custom CSS.

    If I use it after adding code it will delete all custom code and after using the Designer some custom code will not work.

     

    I deleted the css code from the Designer but it doesn't work anyway.

  • Elton Support Team Lead
    Replied on January 14, 2015 at 1:56 AM

    Hi,

    The CSS codes you injected to your form removes the highlight effect when you try to highlight and select the field which I can confirm that it is working with your form. I can't highlight the first two dropdown section. I think that's what the code exactly does.

    Injected CSS code using Form Designer did not work Image 1 Screenshot 30

    I tried it with my form and I see no errors on the CSS.

    Injected CSS code using Form Designer did not work Image 2 Screenshot 41

    Let us know if I have missed anything about your question. Thank you!

  • KriyaYogaVienna
    Replied on January 15, 2015 at 6:10 AM

    I got this css code:

    .form-line.calculatedOperand {
        -webkit-user-select : none;
        -moz-user-select : none;
        -ms-user-select : none;
        -o-user-select : none;
        user-select : none;
    }

     

    to make that a certain calculation field can not be changed by the user.

    But with this code added to my css code the user still can change the field.

    The highlighting you are talking about I had switched off, because it is very ugly and I do not want it. I didn't do that with CSS but by pressing a button in the Preferences.

    Now I switched it on again just to see if it works, but the calculation field still can be changed by the user.

    Injected CSS code using Form Designer did not work Image 1 Screenshot 20

     

    I also tried this css code on an other (test) form, but it is not working.

    http://form.jotformeu.com/form/50125184438351

    (the fields which are called "dynamic" should be protected for user change.

  • Elton Support Team Lead
    Replied on January 15, 2015 at 9:02 AM

    @KriyaYogaVienna

    Thanks for your reply.

    Sorry to say but the CSS you're using will not actually prevent the field value to be edited, what it does is it only makes the text or value unselectable or can't be highlighted. In short, you can't make the field read-only with CSS.

    We actually have a built in feature where you can make the text boxes read-only by going to its properties. However, since you're using calculation widget, it should be read-only be default. Try to uncheck the read-only on your form calculation field and then check it again, see if that helps.

    Injected CSS code using Form Designer did not work Image 1 Screenshot 20

    Here's a clone version of your form http://form.jotformpro.com/form/50143942644958? which has a read-only field on the last line.

    Let us know if this doesn't help. Thank you!