Jump to content
  • 0

Currency field


dmyoungsal

Question

8 answers to this question

Recommended Posts

  • 0

Hi! Just an update on this, there is another solution or workaround that might help you when it comes to formatting text or editable fields in currency. This is by using a JavaScript library that creates an input mask. For more information, you may check these links:
- https://github.com/RobinHerbots/Inputmask
- https://robinherbots.github.io/Inputmask/

As a test, here is a sample code when applied in a DataPage.

Header:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/5.0.7/jquery.inputmask.min.js"></script>

Footer:

<script>

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

$("#EditRecordFIELDNAME").inputmask({ alias : "currency", prefix: '$ ' });
$("#EditRecordFIELDNAME").inputmask({ alias : "currency", prefix: '$ ' });

});

</script>

Hope it helps!
 

Link to comment
Share on other sites

  • 0
On 1/13/2019 at 1:04 AM, cheonsa said:

Hi @dmyoungsal,

 

I understand that you want to display the field AmtPaid as currency on your DataPage. You can go to your Report DataPage > Configure Results Page Fields. 

You can customize your field based on your desired display. However, you cannot change it on your submission form. 

image.png.06f829276165e861970135dff78ea40c.png

 

Regards,

kristina

Hi Kristina,

Why don't i have access to the formatting option? (See Below)
I have the same need. The Table field is set to currency, by the Data Form converts that field to text.

Tks, Stephen

image.thumb.png.2cc460e12e2be654692e3e0b31fb7db8.png

Link to comment
Share on other sites

  • 0
20 hours ago, Pearcey said:

Hi Kristina,

Why don't i have access to the formatting option? (See Below)
I have the same need. The Table field is set to currency, by the Data Form converts that field to text.

Tks, Stephen

image.thumb.png.2cc460e12e2be654692e3e0b31fb7db8.png

Hi @Pearcey, it looks like you are using a submission form so it is expected that the formatting option is not available. The formatting options are only available in Report or Details DataPage (https://howto.caspio.com/datapages/datapage-components/field-formatting-options/) since you already have the value that can be formatted. The currency field data type is also displayed as text field in the submission form because it is an input field .

Link to comment
Share on other sites

  • 0
On 6/24/2022 at 4:46 PM, Meekeee said:

Hi! Just an update on this, there is another solution or workaround that might help you when it comes to formatting text or editable fields in currency. This is by using a JavaScript library that creates an input mask. For more information, you may check these links:
- https://github.com/RobinHerbots/Inputmask
- https://robinherbots.github.io/Inputmask/

As a test, here is a sample code when applied in a DataPage.

Header:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/5.0.7/jquery.inputmask.min.js"></script>

Footer:

<script>

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

$("#EditRecordFIELDNAME").inputmask({ alias : "currency", prefix: '$ ' });
$("#EditRecordFIELDNAME").inputmask({ alias : "currency", prefix: '$ ' });

});

</script>

Hope it helps!
 

@Pearcey, if you would like to display a dollar sign or any currency sign in your currency field upon inputting a value, then you can use this solution provided by Meekee, Just change the 'EditRecordFIELDNAME' with 'InsertRecordFIELDNAME' since you are using a submission form.

Link to comment
Share on other sites

  • 0
On 11/23/2022 at 2:45 AM, PotatoMato said:

Hi @Pearcey, what type of datapage are you using? Is it Submission or Report? The one used by Kristina is a Report DataPage. What output do you want to achieve?

-Potato

Hi Potato,  I'm using a Submission form to collect typical family cost (e.g. £100 on shopping etc.) which then totals up to a budget page to help people budget etc

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