We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

sanjaydalvi
Posts: 7
Joined: Tue Sep 10, 2013 3:35 pm

How do i add a minimum character limit for an Edit box

I need to accept exactly 4 character work from the user in an edit box. I need to know how this can be achieved.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How do i add a minimum character limit for an Edit box

Hello,

In order to achieve that you can verify the length of the string that the user had input through your own custom action.

Then on the [Next >] button where the related edit box is you can add a published event that will execute the custom action. You can take a look on the execute custom action on button push article which may be useful to you.
Also you can condition the display a specific dialog published event to only be executed when the length of that string is according to your scenario.

As a side note, I've implemented your scenario through an Execute inline script code predefined custom action which I had added from the Custom Actions page without sequence.
Then I added this custom action as a “Published event” on the [Next >] button where my edit box was.
Here is the code:

Code: Select all

Session.Property("EDIT_LEN") = CStr( Len(Session.Property("MY_PROP")) )
where:
EDIT_LEN is the property where I set to the string length
MY_PROP is the property assigned to the edit box

If you need any help, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”