danielo515 / obsidian-modal-form

Define forms for filling data that you will be able to open from anywhere you can run JS
https://danielorodriguez.com/obsidian-modal-form/
MIT License
173 stars 13 forks source link

[Feature request] Multiple Checkbox Field Type #293

Open teateatea opened 4 days ago

teateatea commented 4 days ago

Is your feature request related to a problem? Please describe. I'd like to choose multiple static options, but present them all openly.

I could use a lot of toggles, but that wastes screen space, and complicates things. I can also use multiselect, but it requires more than the 3 clicks for 3 checkboxes, and doesn't present all the options openly.

Describe the solution you'd like I'd like a field that works like this:

Name: Sports Description: Check off all the sports they enjoy playing [ ] Football [ ] Cricket [ ] Tennis [ ] Basketball [ ] Golf [ ] Volleyball

Additional context I'd find it convenient if the form editor allowed for both Label & Value on the checkbox!

Thank you for making this whole plug in!

danielo515 commented 4 days ago

Just to make sure I understand the request. This is 'kind of' another way of presenting a multi-select with fixed options. Can that be considered a workaround?

danielo515 commented 4 days ago

I could use a lot of toggles, but that wastes screen space, and complicates things. I can also use multiselect, but it requires more than the 3 clicks for 3 checkboxes, and doesn't present all the options openly.

Ok, not sure how I missed this. That's fair, I will consider adding this

teateatea commented 4 days ago

Just to make sure I understand the request. This is 'kind of' another way of presenting a multi-select with fixed options. Can that be considered a workaround?

Yes! That's what I've been using, but when the number of options in the multi-select starts ballooning, it can get a bit unwieldy.

And then I popped over to the template editor and realized that it had exactly what I'd need at the top the whole time lol. Lots of buttons, nice and compact!

Thank you for your consideration!

Screenshot 2024-07-03 111841 Screenshot 2024-07-03 112347
danielo515 commented 4 days ago

And then I popped over to the template editor and realized that it had exactly what I'd need at the top the whole time lol. Lots of buttons, nice and compact!

Thanks for your kind words. However, the template builder is just a utility to ease the task of buliding templater templates for existing forms. It is not a feature of the form when you invoke it in a modal. Or you mean that it is a nice example of what you are requesting?

teateatea commented 4 days ago

Ah, yes, sorry, that was unclear of me.

It's just a nice example of what I'm requesting! The template builder uses two different styles of it, but there isn't a way to make an actual form field type that can do "many buttons openly presented".

danielo515 commented 4 days ago

My feeling, is that this should be quite easy to add. Will give it a try