Jump to content

Character count display for custom fields with character number limits


This topic is 2603 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi folks,

 

I have a solution running on iPad which allows the user to enter custom values in a number of different fields. 

 

The values also form the label of it's corresponding button in a given layout. Because of the button size, I need to limit the number of characters that can be entered.

 

What I want to achieve is when the user goes to a 'customise button label' layout where they can enter the value to be displayed on the button, a counter resides next to that field that shows a 'real-time' character count as they type a value in, to help them know when they've reached the limit.

 

Any suggestions?

Link to comment
Share on other sites

Just found this in another post (another Topic also)

Set Field [ DisplayField ; Length ( Get (ActiveFieldContents) ) ]

Sound about right? (Will give it a go when I get a chance shortly)

OK, have been thinking about this - there seems to be two ways I could do it;

1. Use a Set field script as above, and run it OnObjectModify (applied to the field having a value entered into it), whereby a global field then has the current object's count put in it, and displayed accordingly.

2. Alternatively, could I instead define the "Character Count" field as a calculation as follows: = Length (Get (ActiveFieldContents))

Have actually tried both, but not getting a value in the Character Count field appearing at all. Obviously missing something.

I'm all ears!

Link to comment
Share on other sites

Thanks for that eos,

 

I'd since found the loop option also, but unfortunately it causes too much stalling between keystrokes for what I hoped for.

 

I realise now that there's isn't a 'real-time' awareness of a field's content, without a looping script, that can give  a cleaner update to the counter.

 

Looks like I'll just have to rely on field validation after the user has filled the field.

 

Cheers,

Link to comment
Share on other sites

  • 3 years later...

In one of my solutions, I have allowed user to enter "long" titles.
I just have a conditional formatting set to reduce font size if long, so full title can be shown.

Length ( field ) > 20

So if title is over 20 characters, font size is reduced.

Link to comment
Share on other sites

This topic is 2603 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.