Using values from non-saved fields as structure fields' default values

I need to access values from certain fields in the panel and set them as default values to some other fields inside a structure field.

Fields, fields, fieldsā€¦ :wink:

Something kinda like the query option from checkbox fields but instead of consulting other previously saved pagesā€¦ Iā€™d like to grab some yet to be saved values in the current page.
I thought of something like:

    default: query this {{some-other-field}}

This idea probably involves some hacky way to access fields filled-out-and-not-yet-saved in the panelā€¦ but someone would know better, I have no idea.

Use case is multi-day events where the extra days might (or not) have the same timetableā€¦ with default begin/end times read from these ā€œdefaultā€ fields.

Example:

   day-default:
        label: First day of activity 
        type: date
        format: DD/MM/YYYY

   time-begin-default:
        label: Begin time (default)
        type: time
        interval: 15

   time-end-default:
        label: End time (default)
        type: time
        interval: 15

   extra_dates:
        label: Extra days & timetable
        type: structure
     
        fields:
            day-extra:
                label: Extra day
                type: date
                format: DD/MM/YYYY
                required: true 

            time-begin:
                label: Begin time
                type: time
                default: query this {{time-begin-default}}

            time-end:
                label: End time
                type: time
                default: query this {{time-end-default}}

Does something like this exists? Doable? Any other ways to tackle this?

I have no answer to your question but how about leaving the field empty if it is the same as in default entry and then in your template check if empty and then show value of default day entry?

Exactly what Iā€™m doingā€¦ I was just looking for ways to keep the panel more user friendly and to automate some stuff.