• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Step 1: Creating a Field

The goal of the special field that you're going to add to your form should be to verify input based on allowed or forbidden HTML tags. If the message body contains HTML tags other than the ones allowed or contains any forbidden tags, the validation of the value should fail. Note that only one of the two attributes can be specified at once.

It is often not necessary to write a field from scratch because Zope 3 ships with a respectable collection already. These fields commonly also serve as base classes for custom fields. For your HTML field, the Text field seems to be the most appropriate base because it provides most of the functionality for you already.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint