Dollar / Currency Input Helper?

0

I'm inputting dollar values into a field in one of my pods. I need them to be numbers, but I want them to display as $10,345 when being inputted because if the user puts their dollar signs and commas, the data is not saved.

I have no problem outputting the data like this, I just need to know how to have an input mask to do this.

I'm fairly new to pods (had a few busy months and I havent been around!), is this something thats easy to do? A job for PODS ui?

thanks!

asked Jun 7 '10 at 2:00

wesbos

56

add comment
enter at least 15 characters

1 Answer

1

You should be able to define a pre-save helper like this, which will strip out anything that isn't a digit character or a decimal point. Replace 'name' in the formula below with the name of your column.

columns['name']['value'] = preg_replace('/[^0-9.]/', '', $columns['name']['value']);

answered Jun 7 '10 at 11:00

chris.pilko

889

add comment
enter at least 15 characters