Adding empty row into dropdown

QuestionsAdding empty row into dropdown
Azam asked 10 years ago

Hi! How can I insert an empty row into dropdown before adding array from query? Sometimes I need to insert rows with NULL fields into db.

2 Answers
Abu Ghufran answered 10 years ago

Add ":;" before value of dropdown options.

for e.g.

$str = $g->get_dropdown_values("select note as k, note as v from invheader");
$col["editoptions"] = array("value"=>":;".$str);

For null entry,

If db fields allows null and we want to save (NULL) instead of "". Defaults to false

$col["isnull"] = true;

These changes are available in updated build.

Azam answered 10 years ago

Great! Thanks!

Your Answer

13 + 2 =

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?