Editrules cell size

QuestionsEditrules cell size
Devon asked 8 years ago

Hello,

Was wondering if there is a way to set the cell size in the edit options menu? I have a notes section that i only want to be edited when the edit button is clicked. The only issue is that edit cell is very small and makes it awkward to use

Thanks

7 Answers
Devon answered 8 years ago

I found

$col["editoptions"] = array("size"=>20, "defaultValue"=>'10');

This works, but can i adjust the height?

Abu Ghufran answered 8 years ago

You can override height with css,

$col["editoptions"] = array("size"=>20, "defaultValue"=>'10', "style"=>"height:30px");

Devon answered 8 years ago

Thanks! That works! Is there anyway to wrap the text so that it fits the size of the text box?

Right now with the above code it just centers inside the larger boxes height and continues to the right

Abu Ghufran answered 8 years ago

Perhaps, you need to use textarea instead of textbox.
Set:
$col["edittype"] = "textarea";
$col["editoptions"] = array("rows"=>2, "cols"=>20);

Devon answered 8 years ago

Thanks! You guys are always so helpful and fast! I was trying to do both, edit the length for the textbox and then textarea height but i'm running into issues. Can i do both at the same time?

$col["edittype"]="textbox";
$col["editoptions"] = array("size"=>50,"defaultValue"=>'30');
$col["edittype"]="textarea";
$col["editoptions"] = array("rows"=>10, "cols"=>20);

Abu Ghufran answered 8 years ago

You can put css for textarea and adjust height/width:

$col["edittype"]="textarea";
$col["editoptions"] = array("style"=>"width:50px;height:50px", "defaultValue"=>'30');

You cannot have both textbox and textarea for a field.

Devon answered 8 years ago

Thanks! This worked perfectly!

Your Answer

17 + 16 =

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?