Hello Obsidian Community!
- Forms in a Modal Window: Forms open in a modal window and return the values. You can trigger them from Templater templates, QuickAdd captures, DataviewJS queries, and many other places.
- Form Definition: Define forms using a simple JSON format. Create and manage a collection of forms each identified by a unique name or use inline forms.
- User Interface: A user interface for creating new forms.
- Input Types: The plugin supports a variety of input types including number, date, time, slider, toggle (true/false), free text, text with autocompletion for note names (from a folder or root), and select from a list of fixed values or notes from a folder.
<%* const modalForm = app.plugins.plugins.obsidianModalForm.api; const result = await modalForm.openForm('example-form'); tR += result.asFrontmatterString() -%>
Which opens something like this
The openForm method allows you to open a form by name and get back the data. The data can be formatted as a string matching a provided template, as a block of Dataview properties, or as YAML frontmatter.
You can even integrate it into QuickAdd captures, like you can see in this example screenshot:
For more details on how to define a form, please refer to the plugin’s README.
Obsidian is a great tool for taking notes, but it also nice for managing data. However, when it’s time to capture structured data, it doesn’t offer many conveniences. This plugin is designed to complement existing plugins and workflows, offering basic building blocks for capturing structured data using forms.
Looking forward to your feedback and suggestions!