Skip to content

Built-in FormInterceptor plugins

Name Description
SampleFormInterceptor Reference implementation demonstrating all three interception points (add, get, set), tied to the demo “Consulting” metadata group (okp:consulting.input1, okp:consulting.input2). Every modification only applies when the current user’s ID is “test” - with any other user it behaves as if the interceptor were not present, so the same environment can be used to compare both behaviours.
- add: appends a suffix to okp:consulting.input1’s value, and rejects okp:consulting.input2 when it is empty or shorter than 4 characters.
- get: removes okp:consulting.input1 from both the properties map and the form elements, and adds an on-the-fly, read-only field okp:consulting.input3 that is never persisted.
- set: re-applies the same length validation as add to okp:consulting.input2, and preserves okp:consulting.input1’s current stored value even though the get stage removed it from the form.