Default value on add form not inserting

QuestionsDefault value on add form not inserting
Gary Brett asked 10 years ago

Hi Abu, I have a standard single grid I am working on, one of the fields has a default value which works on display but is never inserted into mysql, is there a reason for this?

$col["editoptions"] = array("defaultValue"=> userValue(null, "username") );

This outputs correctly as user name 'John Smith' for example but when form submits the table column is empty?

PasteBin http://pastebin.com/5KqRg7fr

2 Answers
Gary Brett answered 10 years ago

Sorry forgot to add I also tried $col["editoptions"] = array("size"=>20, "defaultValue"=>'10') which didnt work either..

Thanks

Abu Ghufran answered 10 years ago

I am unable to regenerate this issue.

Code:
$col = array();
$col["title"] = "Name";
$col["name"] = "name";
$col["editable"] = true;
$col["width"] = "80";
$col["editoptions"]["defaultValue"] = "test default";
$cols[] = $col;

Output:
http://tinyurl.com/pyx3v7b

Your Answer

18 + 14 =

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?