cancel
Showing results for 
Search instead for 
Did you mean: 

input field with maxiumum length

Former Member
0 Kudos

Hey

I want to set a maximum length to my input field. I have created a simpletype and set the max length to 20. So on i have created a context and set the datatype to the simple type i created and there so binded the input field. When i run the application, i can type in as much characters i want in the field with no restrections... someone got any clue of what i might have done wrong?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kristoffer,

Your observation is correct.Recently there was one webblog or article over inputfield.

If i remember correctly Max length what you define is only used for visible length.

You have to write your won code for Max length control.

Former Member
0 Kudos

thanx. and i guess the same rule defines textedit.

Former Member
0 Kudos

I suppose so

Answers (1)

Answers (1)

Former Member
0 Kudos

If you use a normal InputField element, the max length setting in the simple type should work (at least it does in sp11 for us). It will not work with the TextEdit element because it is rendered using a textview not an input tag. If you can, check the html that is rendered for the page. If the max length is working properly, it will add a maxlength property to the html input tag.

-Cindy

Former Member
0 Kudos

Thank you. I made a really dumb mistake and set the simpletype to the wrong context value attribute. It works now, and thank you for the tip about checking the max length. I didnt think of that.