ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Add selectable forms config option

Open aerni opened this issue 3 years ago • 6 comments

I've got a replicator with a form set that lets my client choose the form to display on any given page. However, certain forms shouldn't be selectable. It would be great if we could optionally add the forms that should be selectable to the form field config. Similar to how you can add options to a select field.

aerni avatar Aug 02 '22 19:08 aerni

Couldn't a simple select field work just as well here? It stands to reason that if you're trying to exclude forms, you could just as easily list the ones you want selectable.

jasonvarga avatar Aug 02 '22 19:08 jasonvarga

Yeah, you're right. Sure. That's what I'm doing right now. I just thought it might be nicer to still have the dynamic nature of the form fieldtype. But I guess it would be more of a disallowed options list and show all other forms except the ones selected.

aerni avatar Aug 02 '22 19:08 aerni

Ah no, I remember the issue with the select field. It's that it doesn't augment to a form. And I need augmentation on the frontend.

aerni avatar Aug 02 '22 19:08 aerni

Ah fair enough

jasonvarga avatar Aug 02 '22 19:08 jasonvarga

maybe it would be helpful for other relationship fields as well, that you can mark certain items (like forms or collections) as not selectable or as hidden?

morhi avatar Oct 03 '22 11:10 morhi

Yes, I also think this should be a core relationship fieldtype feature.

aerni avatar Oct 03 '22 13:10 aerni

Maybe you could add query_scopes (https://github.com/statamic/cms/pull/8456/files#diff-65991befe757c3572bc64584dd243cf0f210d15d322db0bce20731aebdbfb219) to the form field type now its supported elsewhere?

ryanmitchell avatar Jul 26 '23 12:07 ryanmitchell