Home Survey App

Can the textarea field limit the number of characters that you can actually type into the field?

Raul_NoaRaul_Noa Customer IT Monkey ✭
Default limit is 255 characters, but a user can type more than 255 characters into the field. If they exceed the character limit, they will not be able to submit but it would be useful if there were a way to hard limit what can be typed into the field rather than just a counter that turns red when exceeded. If this isn't possible, could there be a message in red below the box that reads something like "Maximum number of characters exceeded in your response"

Best Answer

  • Raul_NoaRaul_Noa Customer IT Monkey ✭
    Answer ✓
    The answer is yes. Modify the following file:

    "\\webfrontendserver\inetpub\CiresonPortal\CustomSpace\SurveyApp\directives\survey\editQuestions.html"

    with the following line: 

    <textarea md-maxlength="1024" rows="5" ng-required="!q.Optional" name="textarea{{$index}}" ng-model="q.Answer" maxlength="1024"></textarea>

    The maxlength="1024" will actually limit the number of characters the user can enter into the textarea.

Answers

  • Raul_NoaRaul_Noa Customer IT Monkey ✭
    Answer ✓
    The answer is yes. Modify the following file:

    "\\webfrontendserver\inetpub\CiresonPortal\CustomSpace\SurveyApp\directives\survey\editQuestions.html"

    with the following line: 

    <textarea md-maxlength="1024" rows="5" ng-required="!q.Optional" name="textarea{{$index}}" ng-model="q.Answer" maxlength="1024"></textarea>

    The maxlength="1024" will actually limit the number of characters the user can enter into the textarea.

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Hi @Raul_Noa

    I don't think the 255 character limit applies to the survey app. All the questions and answers get stored in one big text field in JSON which has a max length of 25,600.

    Geoff
Sign In or Register to comment.