You are viewing limited content. For full access, please sign in.

Question

Question

How do i format HTML currency values or the value of a form field?

asked on April 6, 2023

Hi Everyone,

I have a form which needs to be printed to get the final approving CIO signature on paper, so I have everything formatted and then we all realized that the currency values do not hold the format.

Using Form 11 on prem.

Wanting to get the highlighted in red currency to look like the green currency

-OR-

get the green currency to be sized to match the labels.

It seems pretty straight forward but I am stumped!

Thanks for any education on this :)

Sue

0 0

Replies

replied on April 7, 2023

So it looks like you are using the Currency field to dynamically populate the html.  I would add a hidden text field that I fill with the formatted currency amount and then use the hidden text field to populate the html.

$('.ShownCurrency input').on('change', function () {
  var txtCurrency = $('.ShownCurrency input').val()
  $('.hiddenCurrencyToText input').val('$'.concat(txtCurrency));
});

 

1 0
replied on April 7, 2023

Thanks Bert!  That is exactly what I am doing :)  I will give it a try.  It looks very promising :)

0 0
replied on April 6, 2023

This is from the printout of a completed Laserfiche Form? I think the easiest way would be to use a custom HTML field that uses the variables to display the data exactly the way you need it. Otherwise, I have a couple of more complex ideas that could work as well:

  • Have a workflow fill out an already-formatted PDF form with the data from the Laserfiche form.
  • Add the submitted form data to a database and use the database as a mail merge source for a template in Word.
0 0
replied on April 7, 2023

Thanks Kevin!  I do have it as a custom HTML (in red) but they want a comma and dollar sign.  So that's why I started looking at other ways to format.   I couldn't figure it out in the custom HTML...

0 0
replied on April 7, 2023

Forms (I'm using version 10, but it's probably the same) uses different classes for formatting the completed form.  For instance, when formatting the time on one form I need to use the following CSS

#q15 div.cf-date-field-time {margin-top: -26px; margin-left: 150px;} /* time for input forms */
#q15 div.cf-date-field-time.ro {margin-top: -20px; margin-left: 100px;} /* time for read only forms */
0 0
replied on June 2, 2023

Hi Bert,

I'm trying to use your code, but it is not working. I'm testing it on a Cloud system that we need to send the notification email with the correct currency format.

Not sure is the same code applies in this case.

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.