Jump to content

Currency value in Details Page

Recommended Posts

Hi! I just want to share something related to the Currency field on a details page. As of now, if we try to make a Currency field editable on the details page (Changing its form element from 'Display Only' into 'Text Field'), the dollar sign and trailing zero is automatically removed from its decimal. 

Here is the behavior of the Currency Field in 'Display Only' form element: 
And, it displays differently when changed into 'Text Field' form element:


Link to comment
Share on other sites

Since changing the form element into 'Text Field' removes the value's dollar sign and zero in its decimal, one solution for this is the following JavaScript code. Kindly try this on the Footer section of your Details Page: 


<span style="display: none" id="tablevalue">[@field:CurrencyNumber$]</span>

<script type="text/javascript">

document.addEventListener('DataPageReady', function (event) {

var field = document.querySelector("#EditRecordCurrencyNumber");

var tablevalue =  document.querySelector("#tablevalue").innerHTML;

field.value = tablevalue;



Note: Just change all the 'CurrencyNumber' in the code into your Currency field name.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...