There is input, there you can enter for example 100, but you still have value to add the suffix "sm" or "%" and that would be if you change the number, its width, the suffix is also moved. How to implement it?
It is best not to enter in the form of this suffix. He does not need it, do not strain the user of this.
Do you still then these dlinnye go to JS\PHP - substitute suffix there, and best of all it does not substitute for the stage record in the database, unless of course you write to. The way there will be initial data can for example store millimeters and on the output to convert them to meters (substituting a suffix to the view), it is more flexible.
I'll do it like this (Showing the user that need to enter sm, not steaming with the suffixes in the box):