Multi-conditional Form Building

Multi-conditional Form Building
Originally Ansible Authentication Mapping has been configured via code editor. This has made the experience difficult for platform administrators who are not as familiar with YAML. In order to streamline this workflow for a more intuitive experience, it can be replaced with a multi-conditional form builder that allows the user to build out the authentication mappings.
Add form mapping
The first step allows users to select the type of mapping they want to configure through the dropdown button. Once the user selects a mapping type it displays in a collapsed row with the ability to delete the mapping. This row pushes the “Add authentication mapping” down, where the user can continue to add mapping types, or they can expand the mapping row to configure the rest of the mapping form.


Build authentication mapping form
When the user expands the mapping row the user enters in a name for this authentication mapping and selects a trigger from the dropdown. The criteria entered in the trigger field causes a second line of inputs to populate. The inputs in this second row are determined by the selection in the trigger dropdown
In this case, “Groups” has been selected as the trigger so the next row of inputs contains a conditional dropdown and a group's lookup.


This case shows that in addition to the mapping the user entered in the images above, they also added another authentication mapping, selected “Attributes” as the trigger, which then populated a different set of inputs in the second input row.

The user can continue to build the form until they have all their desired authentication mappings set.

This pattern has been specifically implemented for authentication mapping but can be used in many other contexts which rely on building out a form dependent on the user's selections.