Adding prefix Currency '£' to spreadsheet widget

  • Profile Image
    DavidsonLondon
    Asked on April 04, 2019 at 08:03 AM

    Hi there, 

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

    Kind Regards, 

    Screenshot
  • Profile Image
    jonathan
    Answered on April 04, 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.22.50.png


    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.



  • Profile Image
    DavidsonLondon
    Answered on April 04, 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.

  • Profile Image
    Kevin_G
    Answered on April 04, 2019 at 01: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. 

  • Profile Image
    DavidsonLondon
    Answered on April 08, 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, 

  • Profile Image
    Kevin_G
    Answered on April 08, 2019 at 01: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. 

  • Profile Image
    DavidsonLondon
    Answered on April 09, 2019 at 05: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.JPG

  • Profile Image
    jonathan
    Answered on April 09, 2019 at 07: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.