Yes, I’m sorry, changing the datatype on a database column can result in data loss, I tried to make that clear in the instructions. Creating a decimal field type wouldn’t prevent that, it’s just how mysql works.
What happened was that I had made all the changes to decimal in phpmyadmin and added the step change to the numeric data field in the field group. I then put some data into the fields to check that it was working and all was good.
Then I spotted I had not added a step::0.01 to one of the numeric fields, so I added it and updated the fields.
All of the numeric fields for that field group then changed back to numeric BIGINT(20) in phpmyadmin. I suppose that is what they should do, as they are being updated back to the original numeric setting. But that means, you can not make any changes to the field group or click the update fields button, once you have completed the conversions to DECIMAL. Is that correct?
OK, I am very sorry about that. That should not have happened, when the field was updated, it changed the datatype. I did not realize that would happen, and I should have anticipated it when I wrote the tutorial.
You’re right about the decimal field type, that would avoid the problem you ran in to.
Thank you for your reply. Your plugin is excellent for the task we are building and I have set up quite a large multi page input form. But a few of the pages contain quite a few currency fields.
As I am trying to develop the project, I know I will need to make changes to some of the fields in the field group at some point.
Is there any chance that you will create a decimal field type for your plugin in the near future (10,2 would be excellent) or if not, is it something I could easily add, that would not be too much of a problem to implement each time you do a plugin update. If so, could you possibly point me to the files that I need to look at to make the changes.
Thanks very much
I have a currency-type field coming in the next release, as well as safeguards to prevent what happened. That will be available in the next few days.
That’s great. Thank you very much. And thanks for such an excellent plugin.