Condition based on number of characters in input

I’m creating a site-wide search, by using an input and RG’s with a condition of “Name contains Input value”. I would like all the groups which contain repeating groups for the different things I’m searching (Users, Notes, Postings, etc) to not to appear until there are at least 2 characters in the input field. I can hide the group if the input value is empty, but I would love to be able to say hide group unless it has at least 2 characters.

The reason is 1 character like “A” I end up getting a whole bunch of results, but at 2 the searches are much more limited.

Is there any way to do this?

Thank you

Use the InputWatcher plugin, and have a conditional on your repeating group to show only when InputWatcherA’s character count is > 1

And you have the benefit of using the InputWatcher’s value for instant text response

Hi there, @eric10… one way you can hide the groups the way you described is to put a condition on each group that says when the Input's value:number of characters < 2, then select the This element is visible option, and leave the checkbox unchecked. You could also go the other way, of course, and hide the groups by default and show them when the input’s number of characters is greater than 1.

Hope this helps.


Thank you Mike, “number of characters” was what I was looking for that I was not aware of. Worked perfectly!

1 Like