strtolower
strtolower
nskwortsow
Posts: 120Questions: 0Answers: 0
Hi,
For any email address entered, I would like to apply the strtolower() function before saving it to my db.
In Editor (PHP side) how would I implement this?
Merci,
Nathan
For any email address entered, I would like to apply the strtolower() function before saving it to my db.
In Editor (PHP side) how would I implement this?
Merci,
Nathan
This discussion has been closed.
Replies
You'd use a set formatter: http://editor.datatables.net/docs/current/php/class-DataTables.Editor.Field.html#_setFormatter . There are a few set formatters built in ( http://editor.datatables.net/docs/current/php/class-DataTables.Editor.Format.html ) but not one for strtolower - a little closure function would do the business there.
[code]
->setFormatter( function($_, $opts=null ) {
return strtolower( $_ );
}
[/code]
Allan