Suggestion: make boltforms contain a boltform selector field
Puddingboy opened this issue · 2 comments
- OUTDATED , check comment below*
I think it would be a really convenient addition to have. A selectbox specifically to attach a boltform to a record. Yes it's already possible from the twig templates to attach, but this creates the inconvenience of stacking templates. The custom form templates does not always solve this issue.
Please take this into consideration. I think it would be nice to have.
How ideally this would be implemented: when you install boltforms, you attain a new option for a fieldtype you can add to the bolt fields which could be called type: boltformselect. On the record interface in your cms, it should show a simple selectfield default populated with the saved forms from the boltforms.yml, the default selected form should be empty ofcourse to avoid adding forms to records by accident.
I want to reiterate on this suggestion. Rather than implementing a new field type. All extensions for bolt should be able to expose arrays to the select field. You could make it look like:
type: select
options:
values: _extentionname_privatearrayname
This approach should reduce future clutter of custom extension field types a little
No custom field types. Simply an option to expose arrays to the select field.
hi @Puddingboy , you can achieve this already with a normal select, right? Create a select with values for all forms and then use the boltform()
function with the value from the select, like so: {{ boltform(record.selectedform) }}