Input Field maxlength ?

QuestionsInput Field maxlength ?
GL29PA asked 7 years ago

Hi,
Is there a way to lock the number in possible characters in a field ? … ie: so user cannot type more than 10 characters in a specific input field.

1 Answers
Abu Ghufran Staff answered 7 years ago

You can use html property of maxlength with editoptions. e.g.

$col[“editoptions”][“maxlength”] = 10;

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
GL29PA replied 7 years ago

Sorry, it still let me type more that 10 characters …

$col = array();
$col[“title”] = “Postcodes”;
$col[“name”] = “postcode_ref”;
//$col[“width”] = “70”;
$col[“editable”] = true; // this column is not editable
$col[“align”] = “center”; // this column is not editable
$col[“search”] = true; // this column is not searchable
$col[“editoptions”][“maxlenght”] = “10”;
$col[“editrules”] = array(“required”=>true); // and is required
$cols[] = $col;

I also tried with $col[“editoptions”][“maxlenght”] = 10;

Your Answer

0 + 0 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?