Hidden column but saveing a given value

QuestionsHidden column but saveing a given value
SirShadow asked 6 years ago

Hi,

I have a table `order` which is having a column `client`(the id) So this column should be filled by a default value from $_SESSION['client'] but without been visible in grid or add/edit dialog.

I've tried something like below but is not working.

$col = array();
$col["name"] = "client";
$col["hidden"] = true;
$col["editable"] = false;
$col["search"] = false;
$col["default"] = $_SESSION['client'];
$cols[] = $col;

First I was thinking on adding read_only attribute but this means that the value will be shown.
Now I'm thinking to write a novel trough on_insert/on_update creating the function but I want something easy and quick (if is possible off course!)

Thanks in advance.

1 Answers
SirShadow answered 6 years ago

I'm glad to say that I found out after some attempts

$col = array();
$col["name"] = "client";
$col["hidden"] = true;
$col["editable"] = true;
$col["editoptions"] = array("value"=>$_SESSION['client']);
$cols[] = $col;

Your Answer

4 + 11 =

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 / 5. Vote count:

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

Let us improve this post!