Skip to content

[5.x] Enable unselecting fieldtypes for forms #11559

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

Merged
merged 4 commits into from
Mar 17, 2025

Conversation

godismyjudge95
Copy link
Contributor

Sometimes it might be necessary to disable certain fieldtypes for frontend forms - per discord conversion with Marco - https://discord.com/channels/489818810157891584/489818810157891586/1349028284142194699

This PR adds a new method to accomplish that on the FieldtypeRepository and Fieldtype classes: makeUnselectableInForms()

Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to only allow you to make an unselectable fieldtype unselectable again if you've already made them selectable.

You can't make other normally-selectable fieldtypes unselectable.

e.g. Try to make the toggle fieldtype unselectable.

@godismyjudge95
Copy link
Contributor Author

This seems to only allow you to make an unselectable fieldtype unselectable again if you've already made them selectable.

You can't make other normally-selectable fieldtypes unselectable.

e.g. Try to make the toggle fieldtype unselectable.

oh oops, I'll fix it thanks for the catch

@jasonvarga jasonvarga merged commit 790577c into statamic:5.x Mar 17, 2025
24 checks passed
@godismyjudge95 godismyjudge95 deleted the make-unselectable-in-forms branch March 17, 2025 19:44
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

Successfully merging this pull request may close these issues.

2 participants