There are two language versions available: English and Indonesian. When End-Users are typing numeric value on Add/Edit form, then system will automatically convert it into the Words on-the-fly. In addition, system will automatically add Thousand Separator into the Numeric data.
You will learn how to use Composer Packages that provided by PHPMaker 2024. You will be able to know how to add a new PHP Package into your PHPMaker 2024 project very easy and quick. You will learn how to write code in Api_Action server event in order to define our own API in order to get the converted value into the Words based on the certain Decimal value and Language (English or Indonesian).
Besides writing the code in Api_Action, you will also learn how to write code in a Custom File in order to get the converted values in Words from a Decimal value. As we have already known, some PHP Packages are using their own Namespace. So, we need to add it by ourselves into that Custom File. I have not found a way yet to add Namespace into the certain Server Event. For now, the usage of Custom File is the right solution for us.
One of the PHP Package in this PHPMaker 2024 project will give you the idea how to use it in our project without using the PHP Namespace. It's only a simple Class, and you will see how to create an Object based on that Class in our Custom File. You will be able to do the same thing for another PHP Package in your PHPMaker 2024 project then.
Last but not least, you will get a BONUS from me: MasinoInputMask24 Extension by using this PHPMaker 2024 project. This Extension can help you to add the ability of formatting Numeric value by adding Thousand Separator and Decimal Separator while End-Users are typing data on the Form. And the most important thing is, this Extension will not clash with the functionality of Converting either Decimal or Integer value into the Words.
Please note that MasinoInputMask24 is one of the Extensions or is a part of Masino Extensions for PHPMaker 2024. You may actually get Masino Extensions from ILovePHPMaker.com website. However, if you want to use only the Input Mask extension, then you may simply use this project, since it also includes the Extension itself.
By using MasinoInputMask24 Extension, then only Numeric characters can be entered into the Textbox control. This will prevent the characters other than Number can be typed into that Textbox control. We can also define how many maximum number of digits after Decimal point from the Extension side. In this demo, we can define maximum 5 digits after Decimal point. PHPMaker 2024 has not provided the setting for that. Can you imagine now, how cool that MasinoInputMask24 Extension would be?