Changing text field Max Length from 38 to 28 onClick interaction


#1

Hi Guys,

Im trying to change the “Max length” of a text field from 38 to 28 on a click event. This text field also has a character counter which would also change and count down.

The text entered in the text field (whether it contains 38 or 28 characters) will then be passed onto another page of the prototype to be displayed.

Any help would be much appreciated.

Thanks


#2

There’s no way Axure can edit the attributes of a field after it generates the HTML; you’d have to inject some JavaScript in order to truly modify that field’s max length.

There is a way to fake it, however.

Create a dynamic panel with the “short” text field in one state and the “longer” one in another. The button click would just switch the panel states. You can then add some logic to detect which state the panel is in so you know which field’s text you need to pass into your global variable.