WPCubed Product Support

Clearing all contents from TDBWPRichText if text is removed.

I want to remove all RTF code from a TDBWPRichText component if the user deletes all of the text. The result saved to the database can be either a null value or empty string. I can think of several possible approaches but none seem very efficient. Can you give a recommendation? Thanks.

#1 ♥ 0
2.5k Views 2 users read 1 min
support

Hi,

You can use the event OnSaveData and check for 'IsEmpty'. If that is the case assign '' to the field, otherwise set wp.ContinueProcess := true;

Julian

#2 ♥ 0
This category is archived. No new posts are possible.