Partially supported since 3.6, support for reset password, registration
There are situations when using default GUI forms is not suitable for you and your use cases. The good example could be a registration form. I can imagine that different organizations have various ideas what they need to have filled by registration process. To be able to satisfy all of them, how would this form looks like. Which fields would be shown, which of them would be optional and which of them would be required? Exactly for such reasons midPoint introduces custom forms where you can explicitly define which fields are required, which of them would be shown and so on.
Custom forms are defined using FormType objects. After the complete definition for custom form is defined, it is needed to reference to this form from the correct place and the result is that the custom form is shown instead of default one. Most important (and actually supported) attributes are described bellow:
- formDefinition - is used to define the custom form, e.g. in this part attributes which are supposed to be shown are defined. There can be also additional information such as name of the form etc.
- formFieldGroup - specify which attributes are grouped together. It means that everything defined in one formFiledGroup will be shown in the same "container"
- formField - specify configuration for specific attribute.
Both formFieldGroup and formField can have following attributes defined:
- ref (ItemPathType) - path to the specific attribute. e.g. if it is supposed to be custom form for User it can be name, familyName, fullName, extension/ext:myExtensionAttribute, etc. This ref has to have the name (QName, path) of the real attribute as defined in the schema (extension schema) for this object type to which the form belongs to.
- display - specify different display information which override original information as provided in the schema
- label - is used as a display name in the generated form
- help - is used as a tooltip in the generated form
- minOccurs - minimal occurence of the attribute, e.g. if set to the 1, it means that the attribute is required
- maxOccurs - maximal occurence of the attribute
Following is the example of custom form which can be used as a registration form:
After referencing this form definition and applying it for registration, the screen will look like following: