want $ currency in text box

0
i m using this value for calculation see below image.  When a user give  integer input  90 then  I would like to show it as  "$90.00"  if user enters 10000 it should be displayed as $1,000.
asked
3 answers
7

Hi Dharshana,

You can achieve through css styling, add the classname currencyTextbox to your text box and update your custom.scss file and compiler(https://www.dropbox.com/sh/46hip6pq8s9ipqp/AAAHBwm-8qcv9bQKSR7BrirCa?dl=0) your custom.scss file using calypso compile with the below styling

.currencyTextbox::before {
  content: "$" !important;
  position: absolute;
  top: 9px;
}

 

If it is not working the problem is with the css compilation, for testing this style you can also add the style in your main.css file

Thanks!

answered
3

Hi Dharshana,

You can also use Bootstrap Input Addons widget from app store. If this fits your requirement than you will not need any custom styles.

 

Hope this helps! 

answered
0

As an alternative, you could also implement the input field as input group by simply reusing some of the Bootstrap classes. Examples can be found at https://getbootstrap.com/docs/3.3/components/#input-groups-basic

answered