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

Allow fields to select their inputfield, so new Inputfield modules don't always have to include a Fieldtype module #470

Open
Toutouwai opened this issue Dec 15, 2022 · 0 comments

Comments

@Toutouwai
Copy link

Short description of the enhancement

If I understand right, every new inputfield module must be bundled with its own fieldtype module even if one of the core fieldtype modules is already sufficient to hold the inputfield's value. That seems like something that could be improved on.

Take a fieldtype such as FieldtypeInteger. There could be many potential inputfields developed that will set an integer value via different types of interface.

Let's say I want to create an inputfield that will set an integer value via a slider interface. I can't just release InputfieldSlider because PW doesn't provide any way to select that inputfield as the input type for a FieldtypeInteger field. So I must also bundle in a FieldtypeSlider module that does nothing useful - it just extends FieldtypeInteger and specifies that the inputfield to be used is InputfieldSlider.

Maybe there could be some way that inputfield modules can indicate what fieldtype is needed to store their data, and then fields using that fieldtype would have a config option where the user can select between the compatible inputfield modules that are installed.

This request is an expanded version of an existing request: #340
When developing FieldtypeStars I realised that it's an issue that applies more generally to inputfields and fieldtypes.

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