I want to stop people from being able to type text outside of the set size of a text field as I am printing these pages off and any text they type outside of the box does not appear
You have posted to Community Feedback. You may wish to move this post by following these instructions:
How to move from Community Feedback to Discussions
Your question, as I understand it:
How to constrain the content of a field to the length of the field on a layout?
This is difficult as the variations in OS, fonts, font sizes, formatting (bold, etc.) can factor greatly into the "problem".
You might consider field "validation" to limit the number of characters (dialog on entry):
"Defining field validation", Does not exceed specified number of characters
FileMaker Pro 16 Help
And set the number of characters allowed.
You can also give a specific message if the limit is exceeded (upon field exit):
Check the "Display custom message if validation fails" and enter the message into the box underneath.
See this thread for similar question:
Limit characters in text field
(there may be more posts with different suggestions)
Thank you for your post!
beverly has offered great information on your inquiry. As she mentioned, I'm also going to move this thread from the FileMaker Community Feedback Space (which is specifically for input on the Community itself) to the Discussions Space where you should receive more views and potentially more feedback on this topic!
Just keep in mind that the number of characters that can "fit" not only vary with the platform on which FileMaker is running, the number of characters that fit vary with the width of the character. The following two strings are each 10 characters long:
Enforcing fit thus becomes difficult unless you use a monospaced font.
There is a scripted method that uses GeLayoutObjectAttribute that can check the fit after the fact, but it's a bit complex and a bit odd. It's not in the discussion for which Beverly provided a link, but if you want to investigate this option, let us know and one of us will provide either a different link or just put the details right here for you.
Please post any links you find to "alternative methods"!
That would be method not methods, but there are numerous discussions of how to use GetLayoutObjectAttribute to check fit
Here's one such link:
The discussion is about adjusting the text size to fit, but the method described for checking to see if the text fits in the field is the same.
How you address this may depend on the outcome you want. If you only want to print whatever can be fitted into a specific area. then there's plenty of advice so far on the issues you have to address. On the other hand if you would like to be able to print more, but it simply won't show because it doesn't fit into the edit box then there is another way—create a separate print layout. You could then either make the edit boxes big enough to accommodate the largest amount of content likely to be entered and use Sliding options to reduce the field to fit its contents when print, or alternatively use text merge objects instead.
Thanks for everyone's help, I was wondering if there was a way to stop the field from enlarging when you type more text than what would actually fit in the box, at least then everything that is visible when one user populates the field will be visible to all other users,
Did you read the entire thread I posted above:
There are a couple posts by rgordon that are well worth digesting thoroughly (even a demo file included)!
Retrieving data ...