Jump to content
  • 0

dollar sign


BehNaman

Question

2 answers to this question

Recommended Posts

  • 0

Hi there,

You can try using this JavaScript snippet to add a dollar sign to your cascading text field.

<script>
document.addEventListener('DataPageReady', function (event) {

var src = document.querySelector('[id*=InsertRecordMoney]');

src.onchange = function() {
if(src.value.charAt(0) == '$'){
src.value= this.value;
}
else{
src.value = '$' + this.value;
}
}
});
</script>

The if else statement just checks whether the dollar sign is already existing so it would not duplicate it if you happen to change the value of the currency field.
This is what it will look like on DataPage startup:
image.png.2b785200e197c2498029e288b65dbc72.png

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.

Guest
Answer this question...

×   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.

Loading...
×
×
  • Create New...