Hi sir,
Required message is not shown for the Drop down fields.
How to define the message .
2 Answers
Hello,
If your dropdown has empty field and you set it required, then you should see this prompt:
http://prntscr.com/gtfo8r
Code i have used here:
$col = array();
$col["title"] = "Client";
$col["name"] = "client_id";
…
$col["edittype"] = "select"; // render as select
$str = $g->get_dropdown_values("select distinct client_id as k, name as v from clients");
$col["editoptions"] = array("value"=>":;".$str); // <——————————— empty option here at start
$col["editrules"] = array("required"=>true); // <——————————— required to true
$col["formatter"] = "select"; // display label, not value
$cols[] = $col;
Your Answer