TEXT FIELD SIZE - Post ID 298510

User 2836110 Photo


Registered User
109 posts

Is there a way of making a TEXT Field Size smaller than 20%.
I only require a maximum length of 5 characters, and because my form has so many text fields displaying
data, the form view on a phone is soooo long.
Any ideas welcome. Thanks
User 187934 Photo


Senior Advisor
20,181 posts

Hi Lou,
One way is to add a little css to your form.
<style>
#docContainer .fb-input-box input {
font-size: 10px!important;
}
</style>

Another option is jQuery.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script>var jQ = $.noConflict(true);
jQ( document ).ready(function() {
jQ('input[type="text"]').css("fontSize", "10px");
});</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2836110 Photo


Registered User
109 posts

Thanks Eric i will give it whirl today.
User 2836110 Photo


Registered User
109 posts

Hi Eric,

Tried the CSS but it only adjusts the Text Height i was more interested in the adjusting the Text Field Length to a value less than 20%.
I want to display more than one text field across the width on a phone screen.
Hope that makes sense ??
User 2836110 Photo


Registered User
109 posts

UPDATE:
I changed the CSS from font size to width but it still leaves a greyed out large container to the right of the Text Field.
I will keep playing.
User 187934 Photo


Senior Advisor
20,181 posts

Give this a try.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script>var jQ = $.noConflict(true);
jQ( document ).ready(function() {
jQ('input[type="text"]').parents(':eq(2)').css("width", "50%");
});</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2836110 Photo


Registered User
109 posts

Successful as always Eric,
The help from all the people on this Forum is what makes the software amazing to use.
Thanks again.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.