cancel
Showing results for 
Search instead for 
Did you mean: 

field size recuction

Former Member
0 Kudos

Hi, I want to make my inputfield 20 marks long and no longer. I know there is a "lenght" option but it does not prevent anyone to write longer string than 20 marks. Please advice. Regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hi

Create a simpleType (Say String20).

By default it is String.

Specify Length Constraints

Maximum Length: 20

Save metadata.

make the context attribute which is assigned to inputfield of this simpleType (i.e. String20).

regards,

Siva

Former Member
0 Kudos

"Hi

Create a simpleType (Say String20).

By default it is String.

Specify Length Constraints

Maximum Length: 20

Save metadata.

make the context attribute which is assigned to inputfield of this simpleType (i.e. String20).

regards,

Siva"

bingo, thanks. No idea how did I overlooked it in the simple type, eh. Regards

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

What you can do is to check the string length in the server side(After submitting the form or onEnter action handler).If the length exceeds 20 you can give a message using MessageManager api

regards,

sudhir.

Former Member
0 Kudos

Thanks for sugestion, I would prefer way that couse for the user not being able to write any further than amount of signs I set up during developement. Plus, I would like to "visible" part (so its size stays as it is when I add it) of field not being changed. It would make application looking better than everysingle inputfield with different lenght.