I'm using the mask plugin to add a mask to an editor field, but the data captured does not contain the periods in the mask. Am I missing something simple? How are other users capturing IP addresses in a method that assists the user?
Allan, I'm using that exact mask. I enter the data in the editor and it shows the correct mask, but the data stored in the database and reflected in the resulting datatable shows just the digits (so if I entered 192.168.1.1, I see 19216811)
Ah I see! The mask is just a display formatter - it doesn't actually alter the value at all. At least not as far as I am aware.
Imagine for example a credit card number: 0123 4567 8901 2345. The mask plug-in would lay it out with the spaces, but the server would see it without the spaces (which is what would be wanted for that case).
I might be wrong, but I don't see an option in their documentation about being able to get the value as the formatted value. That might be something you need to direct to the developer.
Answers
What mask are you using? The IP address example on the Mask site appears to be using:
Allan
Allan, I'm using that exact mask. I enter the data in the editor and it shows the correct mask, but the data stored in the database and reflected in the resulting datatable shows just the digits (so if I entered 192.168.1.1, I see 19216811)
Ah I see! The mask is just a display formatter - it doesn't actually alter the value at all. At least not as far as I am aware.
Imagine for example a credit card number: 0123 4567 8901 2345. The mask plug-in would lay it out with the spaces, but the server would see it without the spaces (which is what would be wanted for that case).
I might be wrong, but I don't see an option in their documentation about being able to get the value as the formatted value. That might be something you need to direct to the developer.
Allan
Thanks Allan, I figured as much after some more fiddling. I'll reach out to the dev.