Discourse-placeholder-theme-component

discourse-placeholder

This theme component will let you replace any =PATTERN= in a post with text input and selects.

:link: Repository Link

:link: Preview on Theme Creator

Usage

[wrap=placeholder key=NAME description="Your name"][/wrap]
[wrap=placeholder key=COUNTRY default=US defaults=FR,DE,US,CN,AU,CA][/wrap]

Your email: =NAME=-=COUNTRY=@example.com

This will result in:


We use it to create runbooks, howtos and reusable templates (it will work in code blocks). Please share your use cases!

22 Likes

Note: I will try to make it work in a theme component in the coming weeks.

10 Likes

I propose that there should be 4 things.

  1. Can sent detail to email.

or

  1. Can sent detail to inbox of post owner.

or

  1. Can print detail to PDF file for download.

and

  1. Can choose an image.

from%204

2 Likes

This is now available as a theme component, OP has been updated with info.

2 Likes

Iโ€™m interested in this, but Iโ€™m really not understanding what exactly it can do. Does it essentially just create variables that are local to a particular userโ€™s form that they have filled out? Thus you can use the fields dynamically elsewhere on the same page prior to form submission?

Also, the current example displays the following that didnโ€™t help me understand:

1 Like

Preview should now work even if you are not logged in.

Try it, and maybe you will understand now, I made a more compelling sample.

5 Likes