So currently I am using the maxlength module (https://drupal.org/project/maxlength) in order to enforce the fields maximum length and I have a view set up that is embedded to a php Rules action (Execute custom PHP code).
Basically if a field is smaller than the maxlength defined, I am looking for a way to output the value with spaces.
For example: Maxlength 5. Field Value: xxx. Output: "xxx " (without quotes)
I can't seem to find the right module/php code to do this.
I think I have 3 directions I can go with this.
I have it save the spaces to the field based on the maxlength specified when saving the field. I don't like this option much since it actually adds spaces to the value in the database.
I somehow edit the view to display the spaces based on the maxlength of the field.
I edit the Rules views_embed_view php output.
Any help would be extremely helpful. Thank you.
Edit: I am using Drupal 7 by the way.