---
title: "Show or Hide Form Fields Based on User Joomla User Group - Convert Forms"
description: "Have you ever needed to show or hide a form field based on a user’s group or access level? Maybe you only want to require a CAPTCHA for guests while"
url: "https://www.tassos.gr/docs/convert-forms/functionality/show-hide-fields-based-on-user-groups"
date: "2026-05-14T07:39:14+00:00"
language: "en-GB"
---

[ Home ](https://www.tassos.gr/index.php?option=com_content&view=category&layout=blog&id=24&Itemid=1088) / [ Convert Forms ](https://www.tassos.gr/index.php?option=com_content&view=category&id=43) / [ Functionality ](https://www.tassos.gr/index.php?option=com_content&view=category&id=60)

#  Show or Hide Form Fields Based on User Joomla User Group

Have you ever needed to show or hide a form field based on a user’s group or access level? Maybe you only want to require a CAPTCHA for guests while improving the experience for logged-in users. Or perhaps you’re running a listings site and wish to restrict image uploads to registered members. Maybe your form is only accessible to logged-in users, but you want to display a special field exclusively for those in a specific user group.

Let's see how we can make this happen with Convert Forms.

## [Step 1: Create a Hidden Field to Store the User Groups](#step-1-create-a-hidden-field-to-store-the-user-groups)

The first step is to add a hidden field to our form to hold user group information.

![Hidden%20Field%20that%20Autopopulates%20Joomla%20User%20Groups](https://www.tassos.gr/images/2025/03/Hidden%20Field%20that%20Autopopulates%20Joomla%20User%20Groups.png)

1. Go to the **All Fields** tab.
2. Click to add a **Hidden Field.
3. Set the name of the field to "**usergroups**".

Now, let's add a bit of magic to the hidden field. For the **Default Value** setting, we will use a Convert Forms Smart Tag to populate the user's groups, [{user.groupTitles}](https://www.tassos.gr/docs/common/features/smart-tags#user-grouptitles). This Smart Tag returns the titles of the user groups comma-separated. Eg: Public, Registered.

![Hidden%20Field%20with%20Joomla%20User%20Groups%20Smart%20Tag](https://www.tassos.gr/images/2025/03/Hidden%20Field%20with%20Joomla%20User%20Groups%20Smart%20Tag.png)

If the user isn't logged in, it will return the default groups for a guest user, which in most cases are "Public, Guest".

If you believe the names of the user groups are a bit personal and sensitive information, you can use the Smart Tag [{user.groups}](https://www.tassos.gr/docs/common/features/smart-tags#user-groups) which returns the ID of each group assigned to the user. Eg: 1,2,5.

## [Step 2: Apply Conditional Logic to Other Fields Based on the User Groups Hidden Field](#step-2-apply-conditional-logic-to-other-fields-based-on-the-user-groups-hidden-field)

Suppose our form includes a CAPTCHA field, but we only want to show it to guest users while allowing logged-in users to submit the form without it.

![Newsletter%20Subscription%20Form%20for%20Joomla](https://www.tassos.gr/images/2025/03/Newsletter%20Subscription%20Form%20for%20Joomla.png)

To achieve this, we’ll use [Conditional Fields](https://www.tassos.gr/docs/convert-forms/features/conditional-fields) to check the value of the hidden field created in **Step 1**. If the value contains “Guest” which is the default user group for non-logged-in users, the CAPTCHA field will be displayed. Otherwise, the field will remain hidden if the user is logged in.

![Show%20or%20Hide%20CAPTCHA%20field%20based%20on%20User%20Groups](https://www.tassos.gr/images/2025/03/Show%20or%20Hide%20CAPTCHA%20field%20based%20on%20User%20Groups.png)

Go to the **Behavior** tab and click **Setup Conditions** in the **Conditional Fields** panel.

1. Click **Add Condition**
2. In the 1st dropdown select the **User Groups hidden field** you created in the first step.
3. Set the **Operator** to **Contains**
4. Set the value to "Guest".
5. Next, in the **Do** section, select the **CAPTCHA** field you want to hide.
6. Set the **Action** option to **Hide field.**
7. In the **If the condition is not met** section, select again the **CAPTCHA field.**
8. In the **Action** option now select **Show field**.

This conditional logic would read in plain English: "Display the CAPTCHA field if the UserGroups hidden field contains ‘Guest’; otherwise, keep it hidden".

## [Summary](#summary)

The same approach can show or hide fields based on a user’s access levels instead of user groups. In this case, you can use the Smart Tags [{user.authLevels}](https://www.tassos.gr/docs/common/features/smart-tags#user-authlevels) and [{user.authLevelTitles}](https://www.tassos.gr/docs/common/features/smart-tags#user-authleveltitles), which return the IDs and titles of the user’s access levels as a comma-separated list. By applying conditional logic to these values, you can control field visibility based on specific access levels, offering greater form flexibility.

 Last updated on Mar 5th 2025 10:03

## Schema

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://www.tassos.gr"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "Home",
            "item": "https://www.tassos.gr/docs"
        },
        {
            "@type": "ListItem",
            "position": 3,
            "name": "Convert Forms",
            "item": "https://www.tassos.gr/docs/convert-forms"
        },
        {
            "@type": "ListItem",
            "position": 4,
            "name": "Functionality",
            "item": "https://www.tassos.gr/docs/convert-forms/functionality"
        },
        {
            "@type": "ListItem",
            "position": 5,
            "name": "Show or Hide Form Fields Based on User Joomla User Group",
            "item": "https://www.tassos.gr/docs/convert-forms/functionality/show-hide-fields-based-on-user-groups"
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@type": "Article",
    "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://www.tassos.gr/docs/convert-forms/functionality/show-hide-fields-based-on-user-groups"
    },
    "headline": "Show or Hide Form Fields Based on User Joomla User Group",
    "image": {
        "@type": "ImageObject",
        "url": "https://www.tassos.gr/"
    },
    "publisher": {
        "@type": "Organization",
        "name": "Tassos",
        "logo": {
            "@type": "ImageObject",
            "url": "https://www.tassos.gr/https://www.tassos.gr/media/brand/logo-text.png"
        }
    },
    "author": {
        "@type": "Person",
        "name": "Tassos Marinos",
        "url": "https://www.tassos.gr/docs/convert-forms/functionality/show-hide-fields-based-on-user-groups"
    },
    "datePublished": "2025-03-05T09:45:55+02:00",
    "dateCreated": "2025-03-05T09:45:55+02:00",
    "dateModified": "2025-03-05T10:10:36+02:00"
}
```
