Forum
Topic RSS
21:36
17/04/2012
OfflineI have an add/edit form that needs to accept blank entries for a date field. When the entry is submitted blank, I get the following error...
PHP Notice: Undefined offset: 0 in C:\Inetpub\wwwroot\Resources\jqGrid42\php\jqGrid.php on line 4093 PHP Notice: Undefined offset: 0 in C:\Inetpub\wwwroot\Resources\jqGrid42\php\jqGrid.php on line 4093 PHP Notice: Undefined offset: 0 in C:\Inetpub\wwwroot\Resources\jqGrid42\php\jqGrid.php on line 4093
If I enter 'null' in the field, it responds as desired (entering a NULL in the database field); however, I cannot expect my users to enter 'null' for this field.
The following is the configuration for the field and form...
"align"=>"center",
"width"=>60,
"label"=>"Paid Date",
"formatter"=>"date",
"formatoptions"=>array("srcformat"=>"Y-m-d H:i:s","newformat"=>"m/d/Y"),
"editable"=>true,
"editoptions"=>array("dataInit"=>"js:".$mydatepicker),
"searchoptions"=>array("dataInit"=>"js:".$mydatepicker),
"formoptions"=>array("elmsuffix"=>" (mm/dd/yyyy)")
));
$grid->setNavOptions('add', array("height"=>"auto","width"=>"auto","dataheight"=>"auto","closeAfterAdd"=>true,"addCaption"=>"Add Cash NSF Sale"));
I'm using php and SQL Server.
How can I get NULL entered in the database for a date field with no input?
Steven
12:24
Moderators
30/10/2007
OfflineFor professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 994
Currently Online:
9 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66
Log In
Home