RTL Form: Scale rating has uneven spacing and labels are not in the right places

  • PD2023
    Asked on September 28, 2023 at 12:37 AM

    The scale renders in an unblanaced way and the substitles are not in the right places

    RTL Form: Scale rating has uneven spacing and labels are not in the right places Image 1 Screenshot 20


  • Sonnyfer JotForm Support
    Replied on September 28, 2023 at 12:41 AM

    Hi PD2023,

    Thanks for reaching out to Jotform Support. I'm sorry you're having trouble with this. I understand the issue, but I'll need a bit of time to look into this. I will be back shortly.

  • Sonnyfer JotForm Support
    Replied on September 28, 2023 at 12:46 AM

    Hi PD2023,

    Thanks for patiently waiting. I see you deleted your most recent form. Can you please point us to the form you're working on now? I checked the remaining forms on your account but none of them seems to match the fields on your screenshot.

    RTL Form: Scale rating has uneven spacing and labels are not in the right places Image 1 Screenshot 20

    After we hear back from you, we'll be able to help you with this.

  • PD2023
    Replied on September 28, 2023 at 1:56 PM

    Hi Sonnyfer,

    You can see all problems here: https://form.jotform.com/232695883483472

    1. Scale question:
    2. Unevenly spaced options
    3. Legend for minimal and maximal answers don't appear below them as they do in English
    4. Dropdown question - radio button to left of text rather than to the right as it should be in Hebrew

    Thanks,

    Doron

  • Afzal JotForm Support
    Replied on September 28, 2023 at 8:19 PM

    Hi Doron,

    Thanks for getting back to us. I understand you are having issues with the Scale Rating field and the Single Choice field. This can be fixed by adding custom CSS to your form. Check out the steps and screencast below to see how it's done:

    • Open your form in Form Builder and click on the blue Paint Roller icon on the right side of the screen.
    • Under the Styles tab, paste the code below into the Inject Custom CSS area.
    /*Thread - 5580721*/
    /*For the Scale Rating field*/
    .rating-item:last-child {
        margin-right: 24px !important;
    }

    span.rating-item-title.for-to {
        text-align-last: left;
    }

    span.rating-item-title.for-from {
        text-align-last: right;
    }

    /* to align single choice */
    .form-checkbox-item label:before {
      position: relative;
      direction: rtl !important;
      display : inline-flex;
    }

    /* to align single choice */
    .form-radio-item input:checked + label:after {
      position: absolute;
      direction: rtl !important;
      right: 7px !important;
      float: right;
    }

    /* to align single choice */
    .form-radio-item label:before {
      position: relative;
      direction: rtl !important;
      display : inline-flex;
    }

    /* to align buttons */
    .form-pagebreak{
     float: right;
    }

    .form-label.form-label-auto {
       display: block;
       float: none;
       text-align: left;
       width: 100%;
       }
    /*Thread - 5580721 - Ends here*/
    • Click on Save, and you're done.

    RTL Form: Scale rating has uneven spacing and labels are not in the right places Image 1 Screenshot 30

    Here's what the result will look like:

    RTL Form: Scale rating has uneven spacing and labels are not in the right places Image 2 Screenshot 41

    Here's the cloned version of the form that you can test.

    Please give it a try and let us know how it goes. 

  • PD2023
    Replied on October 1, 2023 at 4:39 PM

    Hi Afzal,

    Thanks for the CSS code. I added the CSS to what I already had.

    It did improve the situation in some points, but please see:

    RTL Form: Scale rating has uneven spacing and labels are not in the right places Image 1 Screenshot 20

    1. 9 and 10 still colser than they should be
    2. Radio buttons shouldhave some spcae from the text that follows them
    3. The text for some questions now comes out on the left, while with the previous CSS it came up on the right as it should.

    The form is https://form.jotform.com/232695883483472


    Please advise,

    Doron



  • Sweta JotForm Support
    Replied on October 2, 2023 at 2:10 AM

    Hi Doron,

    Can you review my cloned form here? If everything goes well, you can replace your existing CSS with the following:

    .form-line-column .form-label {
       text-align: right!important;
       direction: rtl;
    }
    .form-all *{ text-align: right; direction: rtl; !important;}
    /*Thread - 5580721*/
    /*For the Scale Rating field*/
    .rating-item:last-child {
       margin-right: 24px !important;
    }
    span.rating-item-title.for-to {
       text-align-last: left;
    }
    span.rating-item-title.for-from {
       text-align-last: right;
    }
    /* to align single choice */
    .form-checkbox-item label:before {
     position: relative;
     direction: rtl !important;
     display : inline-flex;
    }
    /* to align single choice */
    .form-radio-item input:checked + label:after {
     position: absolute;
     direction: rtl !important;
     right: 7px !important;
     float: right;
    }
    /* to align single choice */
    .form-radio-item label:before {
     position: relative;
     direction: rtl !important;
     display : inline-flex;
    }
    /* to align buttons */
    .form-pagebreak{
     float: right;
    }
    /*Thread - 5580721 - Ends here*/
    .rating-item {
    margin-right: 21px!important;
    }
    .form-radio-item label::before {
    margin-left: 21px;
    }
    .form-label.form-label-auto {
    text-align: right;
    }

    Give it a try and let us know if you need any help.