How to have a reply link with pre-filled information?

Been doing a lot of work around Discourse lately and really love the software! Very well thought out, thank you!

One feature request: a link that automatically opens the reply composer, or asks the user to login and redirects them to the reply composer after a successful login. Basically exactly like How to create a new topic link with pre-filled information but for replies.

Thank you!

1 Like

I use something like this:


This seems to work. I added the code in the API initializer of my theme. Thank you!

1 Like

I just realized that this solution doesn’t ask the user to sign up or log in, if they’re not.

I think you can have some logic in the theme component to show the login page if the user isn’t logged in.

What I currently do, linking from another site, is enforcing the login flow like this, but I’m not sure if this works if you’re not using SSO:


Having it in the theme component is better to avoid unnecessary redirects anyway, I’ll try improving it when I get a chance (I’ll comment here if I do).

Just tried it. Returns a 404 since I don’t have SSO enabled I guess :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.