Anonymous form that creates a topic

AI-generated summary

The discussion revolves around creating an anonymous form that allows visitors to post notes or questions without registration, effectively functioning like a ‘Contact Us’ or ‘Guestbook’ feature. dsims explores using the Discourse API to create topics as a shared ‘anon’ user, possibly with a plugin to display a custom name per post. pfaffman suggests using email-to-forum functionality for a category, referencing the official guide on starting topics via email. dsims considers faking a POST to create a ‘staged’ user but notes the need to prevent emails to that user. dsims also mentions the possibility of creating a user and topic via API, then deleting the user while retaining the post, citing a related meta-discourse thread. thaidb adds a similar use case, wanting to embed a form on another website that auto-posts a topic or sends a message to admins/moderators.

I want visitors to be able post a simple note or question without having to register, kind of like an integrated “Contact Us” form or “Guestbook”. So I was considering using the API to set up a simple form that creates topics as a shared “anon” user. I was also thinking I could make a plugin that stores a different name per post that is displayed instead of the shared username.

Any technical reason this wouldn’t work?

You can set up a category that allows creating topics via email and then have some “contact us” forum that emails to that (preferably secret) address.

I suppose I could fake a POST to the same endpoint which I believe would create a “staged” user. There needs to be a way to avoid sending any emails to that staged user though.

Another option might be to create a new user and topic via the API, then delete that user. According to this it’s possible to delete a user and retain the post, but I can’t find any details about how that works or where it happens in the code.

I wanna create contact form embed code other website, after user complete form and auto post a topic Discourse or send to Message admin or moderator?