Conditional fields for profile fields

AI-generated summary

RCheesley proposes adding conditional fields to Discourse profile forms, where certain fields appear or disappear based on a user’s previous answer — for example, showing qualification fields only if the user answers ‘Yes’ to ‘Do you have any qualifications?’. This would streamline the profile editing experience by reducing clutter and improving usability. RCheesley suggests a simple UI mechanism to link answers to fields, allowing admins to choose which fields to show or hide per response. codinghorror suggests that for complex conditional surveys, an external survey service might be more appropriate. RCheesley counters that their use case is simple — one conditional trigger revealing two fields — and questions how an external survey would integrate with Discourse’s native profile completion workflow. The discussion highlights a desire for lightweight, built-in conditional logic to enhance user experience without requiring external tools.

Sometimes if a member of a community answers a specific question on their profile, you may wish to show or hide other fields based on the answer.

A use case might be ‘do you have any qualifications’ and if they answer ‘Yes’ then you might show additional fields where these could be entered. There are a lot of potential use cases for this, I feel.

Presently all fields showing can result in a pretty bloated profile edit screen, when some questions may not be appropriate based on previous answers, but the user still has to wade through them - which is a poor user experience & waste of brain cycles!

As a rough ‘how this might work’ I’d maybe expect to have some way of linking the answer to a dropdown question to another field and denoting that it is a conditional field.

So, for example in the case above, next to the ‘Yes’ option (or somewhere on the linked question where you select the outcome from a previous question), have some way of choosing which fields depend on that yes answer and hence show on the user editing interface when ‘Yes’ is selected. Ditto for the ‘no’ answer.

It could be a ‘select fields to show’ and ‘select fields to hide’ would work.

1 Like

If you are doing a lot of complex, conditional surveying of members, perhaps an external survey service might be more appropriate for that aspect?

1 Like

In my case, it’s pretty simple. One field, based on a yes answer, show two additional fields. How would you suggest using an external survey service would work with a user profile completion on Discourse?

1 Like