We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to create a multiline input textbox

Thread ID:

Created:

Updated:

Platform:

Replies:

130675 May 25,2017 12:06 AM May 26,2017 02:03 AM ASP.NET Core 3
loading
Tags: MaskEdit
dsapo
Asked On May 25, 2017 12:06 AM

Hi Support:

What Syncfusion may I use for a multiline input editor.

Thanks in advanced.

David



Karthik Ravichandran [Syncfusion]
Replied On May 25, 2017 06:34 AM

Hi David, 
 
Thanks for contacting Syncfusion support. 
 
We have checked your query (How to create a multiline input textbox). Currently we don’t have a separate TextArea component. You can achieve your requirement in application level by using “.e-textarea” class. It will change the Html TextArea component to the EJ appearances. Please refer the below code block. 
 
<textarea id="text" class="e-textarea"></textarea> 
 
For your convenience, we have attached the sample in the below link. 
 
 
Please let us know if you need further assistance on this. 
 
Regards, 
Karthik R 


dsapo
Replied On May 25, 2017 10:47 AM

Hi Karthik:

Thanks for your answer, but could do I add something similar to this for the textarea:

validation-rules='new Dictionary<string, object>() { { "required",true} }'
validation-message='new Dictionary<string, object>() { { "required","Required!"} }'

My intention is to make the textarea a required field, so when the user forgets to fill it to display the red message "Required!"

Thanks again

David

Karthik Ravichandran [Syncfusion]
Replied On May 26, 2017 02:03 AM

Hi David, 
 
Thanks for your update. 
 
You can achieve your requirement by using the jQuery validation. Please refer the below code block. 
 
[html] 
<form id="myform" name="messageForm"> 
        <div class="control"> 
            <textarea id="textarea" class="e-textarea" name="text"></textarea> 
        </div> 
        <div class="control"> 
            <input type="submit" value="Submit" id="submit" /> 
        </div> 
</form> 
 
[script] 
 
$("[name='messageForm']").validate({ 
    rules: { 
        text: { 
            required: true, 
            minlength: 8 
        } 
    }, 
    messages: { 
        text: { 
            required: "Enter the value" 
        } 
    } 
}); 
 
$.validator.setDefaults({ 
    //to validate all fields(hidden also) 
    ignore: [], 
    //if we don’t set custom class, default “error” class will be added 
    errorClass: 'e-validation-error', 
    //it specifies the error message display position 
    errorPlacement: function (error, element) { 
        $(error).insertAfter(element.closest(".e-textarea")); 
    } 
}); 
 
Note:  To achieve the validation, you should refer the jquery.validate.min.js file in your project. 
 
For your convenience, we have attached the sample in the below link. 
 
 
To know more details about jQuery validation, please refer the below documentation link:
https://jqueryvalidation.org/documentation/
 
 
Please let us know if you need further assistance on this. 
 
Regards, 
Karthik R 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;