Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Select widget as variable type fields #7597

Unanswered
hkst24 asked this question in Q&A
Select widget as variable type fields #7597
Sep 12, 2025 * 2 comments * 3 replies
Return to top
Discussion options

hkst24
Sep 12, 2025

Hello everyone! I have a problem, I want when choosing a value in the select widget, it would not be just a string or a number. But a whole object with its own fields. Of course, there is a list/types implementation, but it still stores a list of different objects with their own fields. I want to do the same, but so that it is not a list

P.S. the max=1 parameter does not suit me either

You must be logged in to vote

Replies: 2 comments 3 replies

Comment options

martinjagodic
Sep 12, 2025
Maintainer

Do you have an example config of what you want?

You must be logged in to vote
0 replies
Comment options

hkst24
Sep 12, 2025
Author

- label: "settings"
name: "specs_and_setts"
widget: "object"
fields:
- label: "Widgets"
name: "widgets"
widget: "list"
summary: "{{fields.type}}"
max: 1
types:
- label: "Camera angle"
name: "camera_angel"
widget: "object"
fields:
- { label: "Default", name: "default", widget: "number", default: 30, required: true }
- { label: "Max", name: "max", widget: "number", default: 60, required: true }
- { label: "Min", name: "min", widget: "number", default: 0, required: true }

In addition to the camera angle, I want to add another type

As a result, it should turn out that when creating this content, I choose either the camera angle or something else. Together - it is impossible

You must be logged in to vote
3 replies
Comment options

martinjagodic Sep 12, 2025
Maintainer

I see, you want a variable type object. Unfortunately, this is not a feature (yet).

Comment options

hkst24 Sep 12, 2025
Author

It is clear that it does not exist. Is it possible to make it as a custom widget using CMS.registerWidget?

Comment options

martinjagodic Sep 12, 2025
Maintainer

I'm 95% sure that it's possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants