I need to strip out any question marks from a field before I insert/update the record. You need to use a "Custom Trigger" of the "Before" kind The code will be $tNG->setColumnValue("art_heading", trim(str_replace('?',' ',$tNG->getColumnValue('art_heading')))); Remember to use the escape character \ when you want to replace a " with a ' e.g. $tNG->setColumnValue("art_heading", trim(str_replace('"','\'',$tNG->getColumnValue('art_heading')))); |
|||||||||||
Although we try to ensure all the articles submitted are valid it is your responsibility to make sure you have backups before you use these suggestions on your pc or websites. |
|||||||||||
|
|||||||||||