Adding prefix Currency '£' to spreadsheet widget

  • DavidsonLondon
    Asked on April 4, 2019 at 8:03 AM

    Hi there, 

    is it possible to add a £ prefix to my calculated value fields?

    Kind Regards, 

    Jotform Thread 1782254 Screenshot
  • jonathan
    Replied on April 4, 2019 at 10:25 AM

    I found a way but its crude as it was not intended to work like that.

    Please take note that the spreadsheet widget does not have currency data format so the currency symbol was not intended to be in the data.

    1554387828zzz 2019 04 04 22 Screenshot 10


    I added this CSS codes in the custom CSS codes of the Spreadsheet widget.


    td.E:before{

    content: "£";

    width: 10px !important;

    position: relative;

    top: 30px !important;

    left: 15px;

    color: #000;

    }

    .cell-input{

    position: relative !important:

    padding-left: 10px !important;

    }

    Please try also add on your form and see if the results will be satisfactory for you.

    Let us know if you need further assistance.



  • DavidsonLondon
    Replied on April 4, 2019 at 12:09 PM

    Hi Thanks for the response, this does indeed work however it doesnt display the currency symbol before the numerical data it overlaps.

  • Kevin Support Team Lead
    Replied on April 4, 2019 at 1:50 PM

    I have been testing the code my colleague provided and I can see it works, but it does not display the currency sign correctly due to the following code injected on your widget: 

    input {


        text-align: left!important;


    }

    Please try removing it and see if that helps. 

    If you need further assistance, let us know. 

  • DavidsonLondon
    Replied on April 8, 2019 at 12:15 PM

    Thank you this has indeed worked as intented however the entire table is now larger as a result (every cell is a higher height) is there any other CSS code i can use to make the cells shorter again?


    Many Thanks, 

  • Kevin Support Team Lead
    Replied on April 8, 2019 at 1:16 PM

    Try injecting the following CSS code: 

    tr:not(:nth-child(1)) td, tr:not(:nth-child(1)) th {

        padding: 0px !important;

        margin: 0px !important;

    }


    .cell-input{

        height: 100% !important;

    }

    I hope this helps. 

  • DavidsonLondon
    Replied on April 9, 2019 at 5:22 AM

    Thank you so much for your help, 

    I have another question however. I feel the spreadsheet is almost ready with the exeption of one more oddity ha.

    Is there a way to stop the recurring numerals? or limit the decimal places?

    some calculation end up with an undesired result in the Total costs cell 'as shown below'

    Many Thanks, 

    1554801719Capture Screenshot 10

  • jonathan
    Replied on April 9, 2019 at 7:24 AM

    Hi,

    The next question is a different feature. So I created a separate thread for it here https://www.jotform.com/answers/1787011

    We will attend to it shortly.