Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting max length in bootstrap x-editable form

I need to set max length for the text box in the bootstrap xeditable form.The thing is that the textbox which appears is an in build feature of the form so i could not set maxlength as an html attribute.I tried it using jquery but its not working out.( I am not able to attach the screenshot) Please help me to solve this,

like image 622
user2091275 Avatar asked Mar 22 '13 14:03

user2091275


1 Answers

You can set HTML attributes by overwriting the template:

Such as:

$('#your_id').editable({
  tpl: '<textarea maxlength="250"></textarea>'
});
like image 143
Einar Avatar answered Oct 17 '22 10:10

Einar