User Field Prompt

:discourse2: Summary User Field Prompt allows you to show a user field form in any Discourse post.
:eyeglasses: Preview Preview on Discourse Theme Creator
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-user-field-prompt
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Features

User Field Prompt allows you to show a user field form in any Discourse post. Changes made in the form will be saved in the current user profile. It’s useful to ask users to make changes to a user field without having to force them to search the field in their profile.

Usage for a user field named age and another one named best fruits:

[wrap=user-field names="age,best fruits"][/wrap]


:discourse2: Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.

Last edited by @david 2025-08-28T10:28:45Z

Check documentPerform check on document:
32 Likes

Hi, does not work for me, it displays a blank field and an error when saving the post.

1 Like

Hi, has anyone successfully used this ?

hi @patrickemin
I can confirm this is currently not working. I’ve tagged in the relevant people, so hopefully there will be a fix soon.

2 Likes

Thanks for the report. This should be fixed now: FIX: Rendering strategy (#34) Ā· discourse/discourse-user-field-prompt@c468800 Ā· GitHub

3 Likes

Hi, I tested again and it’s still not working: no error displayed but the post is blank.

Any chance you can share a link to an example broken post on your forum? (in PM is fine if you prefer not to share here)

The preview of the theme on theme-creator is working for me (as long as you’re logged in)

Yes here you are: User field prompt test - CatƩgorie test - Dessein-Tech

Are you sure the user-field-prompt theme component is installed and enabled? I don’t see its code in the dev tools :thinking:

My bad the TC was deactivated, it’s now active, I created a new topic: User field prompt test 2 - CatĆ©gorie test - Dessein-Tech the frame around the field appears but is not editable. On top of that, the delete button and edit button for that topic do not work (there a delay of 30 seconds before the topic is actually deleted or can be edited). The wrench icon does not react too. This happens in Preview mode too.

1 Like

I think the problem is that your site is running a legacy version of the post-stream, because discourse-nationalflags has not yet been updated for the new post stream. As an admin, you should be seeing a red banner about that issue.

The recent fixes for user-field-prompt were built only with the new post-stream in mind, so that’s why it’s causing errors on your site.

So if you need this user-field feature right now, I’d recommend disabling the nationalflags plugin. Otherwise, you’ll need to wait for the developer of that plugin to make the necessary updates.

x-ref:

5 Likes

Thank you for your analysis :slightly_smiling_face: . I’ll wait for the nationalflags update.

1 Like