Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input prompt to replicate ability of window.prompt #111

Closed
GitMurf opened this issue Apr 16, 2021 · 2 comments · Fixed by #114
Closed

Input prompt to replicate ability of window.prompt #111

GitMurf opened this issue Apr 16, 2021 · 2 comments · Fixed by #114
Assignees
Labels
enhancement New feature or request

Comments

@GitMurf
Copy link
Contributor

GitMurf commented Apr 16, 2021

Is your feature request related to a problem? Please describe.

When I run a template I would like to be able to re-use the same template for several scenarios but input some dynamic values to provide to the templater engine. So for example, I am creating a template that will create a new page for a "Task" so I can assign meta data in YAML to the Task. One of the items I'd like when I run the template is to input a "Due Date" so I need a pop up to ask me "What is the Due Date?" and then I enter "Next Wednesday" and then Temmplater will "process" that string and add accordingly into my template based on the JS etc. I have in my template.

Describe the solution you'd like

The easiest way to describe the solution I need is just the JS native window.prompt. A pop up appears, asks the user for input, and that input can be used as a variable in <%* My custom JS code / templater commands will use the input string as a variable to do stuff with.... %>

@GitMurf GitMurf added the enhancement New feature or request label Apr 16, 2021
SilentVoid13 added a commit that referenced this issue Apr 16, 2021
…em.prompt internal function

tp.system.prompt spawns a small modal prompt that asks for user input and spits it back

closes #111
@SilentVoid13
Copy link
Owner

This has been implemented, and will be shipped in next release!

@GitMurf
Copy link
Contributor Author

GitMurf commented Apr 17, 2021

This has been implemented, and will be shipped in next release!

You are amazing! Thank you! This is a game changer in my book :) so excited to use this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants