Skip to content

Force Text to Upper Case Upon Submit

Create a custom event handler, use event
  • jqGridAddEditBeforeSubmit
See https://phpgrid.com/documentation/add_event/ and https://phpgrid.com/example/custom-event-handler/

Your code should be similar to the following

$beforeSubmit = <<<BEFORESUBMIT
function (event, status, postData)
{
     $('input#mytexttoupper').val (function () {
       return this.value.toUpperCase();
     })
}
BEFORESUBMIT;
$dg->add_event("jqGridAddEditBeforeSubmit", $afterSubmit);


Feedback and Knowledge Base