pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.06k stars 264 forks source link

Support multiple default values in case of relationships or repeatables #7186

Open JoryHogeveen opened 9 months ago

JoryHogeveen commented 9 months ago

Problem to Solve

https://wordpress.org/support/topic/how-to-populate-a-relationship-field-as-a-list-with-more-than-one-avlue/

We currently only allow a single default value.

Proposed Solution

  1. Maybe we could make the default value a repeatable field?
  2. Another option is to explode the default value by predefined separator in case it's a multi-value field
  3. Or we could allow JSON input?

Possible Workaround

Currently you can only use PHP filters I suppose.

1HabD commented 9 months ago

I like the second option as it seems easy to type in (better than JSON) from the admin back-end.

sc0ttkclark commented 7 months ago

I like the idea of turning the default value into a repeatable text field if it's a multi relationship/file field. Great idea!

sc0ttkclark commented 7 months ago

I think this lends itself to an upgraded user experience for default values. They should really ultimately be the same kind of field type for input.