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

Suggestion: make boltforms contain a boltform selector field #299

Open
ghost opened this issue Feb 11, 2020 · 2 comments
Open

Suggestion: make boltforms contain a boltform selector field #299

ghost opened this issue Feb 11, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 11, 2020

  • 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.

@ghost
Copy link
Author

ghost commented Nov 19, 2020

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.

@I-Valchev
Copy link
Member

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) }}

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

No branches or pull requests

1 participant