Is it possible to prefix input box with '$'?

  • stormingrobots
    Asked on January 29, 2020 at 2:24 AM

    I would like to give it a consistent look,  like having the $ lined up.  Suggestion? 

    1580282603junk Screenshot 10

  • jherwin
    Replied on January 29, 2020 at 6:40 AM

    How about something like this?
    1580297994this Screenshot 10
    Please check and confirm.

  • stormingrobots
    Replied on January 29, 2020 at 10:06 AM

    Sorry, I know what a consistent look means.  What I am asking is  how in terms of the anything i can change in the form setup in technical sense, nor aesthetics sense.

  • Richie JotForm Support
    Replied on January 29, 2020 at 1:40 PM

    For a consistent look, you can use the form calculation widget instead of the short text entry.

    Is it possible to prefix input box with $? Image 1 Screenshot 40

    You can pass the value of your short text to your Form calculation widget so that it won't disrupt your calculation conditions.

    Is it possible to prefix input box with $? Image 2 Screenshot 51

    Sample screenshot:

    Is it possible to prefix input box with $? Image 3 Screenshot 62

    You may try to clone my sample form:

    https://form.jotform.com/200285214041945

    Please check it out and let us know if this fits your requirements.


  • stormingrobots
    Replied on January 29, 2020 at 1:48 PM

    Wonder if you have looked at how i did the formula?!  I knew how to do it. I a askimg hoe to align the $. I means.  Aligning the $ even when # of digits are different.


    $       50.00

    $  1500.00

  • Richie JotForm Support
    Replied on January 29, 2020 at 3:02 PM

    My apologies for the confusion. I did look up your formula and using the Form calculation widget it will give you a correct constant alignment of the dollar $.

    However, seeing you're using the conditions to get the calculation to your short text entry, directly using the form calculation widget will not work.

    You will have to get the values of your short text entry to be transferred to your Form Calculation widget for this work around to work.

    Sample screenshot:

    Is it possible to prefix input box with $? Image 1 Screenshot 20

    Kindly check my sample form and let us know your thoughts.

  • stormingrobots
    Replied on January 29, 2020 at 4:17 PM

    but this won't automatically adjust the spaces though, will it? 

    Current injection like what you stated (just like what I have in it now) . 

    $  <2 spaces here in the calculator> 50

    for 1500,

    it will show: 

    a) if left justified

    $  1500

    $  50

    b) if right justified

               $  1500

                   $  50


    but not: 

    $    1500

    $        50

    This is why I was thinking to put a $ right before the input box like this: 


    1580332646junk2 Screenshot 10  

    is it possible?


  • David JotForm Support Manager
    Replied on January 29, 2020 at 7:18 PM

    Hi, yes it is possible, please inject this CSS code: https://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes

    #cid_66:before,

    #cid_77:before,

    #cid_96:before,

    #cid_156:before,

    #cid_63:before,

    #cid_73:before,#cid_104:before{

        content: "$";

    }

    Result: https://form.jotform.com/200287677814968

    1580343487fees Screenshot 10

  • stormingrobots
    Replied on February 7, 2020 at 10:58 AM

    Thank you.