You can use this code when you wish the input is converted to uppercase, lowercase or capitalized letters.
TO UPPERCASE:
[size=3][font=arial,helvetica,sans-serif]On the crud method you use before render:[/font][/size]
[size=3][font=arial,helvetica,sans-serif]
[/font][/size]
$crud->callback_add_field('fieldname',array($this,'callback_to_upper'));
[size=3][font=arial,helvetica,sans-serif]Callback function:[/font][/size]
[size=3][font=arial,helvetica,sans-serif]
[/font][/size]
function callback_to_upper()
{
return '<input type="text" name="fieldname" style="text-transform:uppercase;">';
}
TO LOWERCASE:
[size=3][font=arial,helvetica,sans-serif]On the crud method you use before render:[/font][/size]
[size=3][font=arial,helvetica,sans-serif]
[/font][/size]
$crud->callback_add_field('fieldname',array($this,'callback_to_lower'));
[size=3][font=arial,helvetica,sans-serif]Callback function:[/font][/size]
[size=3][font=arial,helvetica,sans-serif]
[/font][/size]
function callback_to_lower()
{
return '<input type="text" name="fieldname" style="text-transform:lowercase;">';
}
TO CAPITALIZE:
[size=3][font=arial,helvetica,sans-serif]On the crud method you use before render:[/font][/size]
[size=3][font=arial,helvetica,sans-serif]
[/font][/size]
$crud->callback_add_field('fieldname',array($this,'callback_to_cap'));
[size=3][font=arial,helvetica,sans-serif]Callback function:[/font][/size]
[size=3][font=arial,helvetica,sans-serif]
[/font][/size]
function callback_to_cap()
{
return '<input type="text" name="fieldname" style="text-transform:capitalize;">';
}
Hope you like it!
Cheers.