how can i default value for select?

Questionshow can i default value for select?
Erhan asked 2 years ago

 

$_GET[“sigid”] is default value.

I want to default filter for select column. My code is;

$col = array();
$col[“title”] = fnp_chef_lang(‘Belge No’);
$col[“name”] = “stock_in_group_id”;
$col[“dbname”] = “sig.id”;
$col[“width”] = “50”;
$col[“show”][“list”] = true;
$col[“show”][“view”] = true;
$col[“editable”] = true;
$col[“search”] = true;
$col[“edittype”] = “lookup”;
$col[“editoptions”] = array(“table”=>”stock_in_group”, “id”=>”id”, “label”=>”invoice_number”);
$col[“searchoptions”] = array(“defaultValue”=>$_GET[“sigid”]);

$cols[] = $col;

1 Answers
Abu Ghufran Staff answered 2 years ago

In addition to this, You will need to set postData when grid loads. Refer this code:

https://www.gridphp.com/demo/demos/search/search-onload.phps#L.36-64

Demo: https://www.gridphp.com/demo/demos/search/search-onload.php

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

5 + 4 =

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?