Select-Field setting the text of another field in a panel

What I am trying to do:


When the user selects an entry from the combobox, the panel is supposed to fill in a default text to the textfield.
After that the user still has to be able to change the text.

In this case it is a page for a school. There are basically 4 reasons why a school is closed:

  • Storm
  • Snow
  • extreme heat
  • structural damange of the building

So there are 4 default texts.

I have the feeling that this might somehow work by using the Query-Language (, but so far I didn’t figure it out. Perhaps somebody here can give me some pointers :slight_smile:

Thanks you in advance.

The easy variant without coding:

  1. Create 4 textarea fields with default values (keep in mind that default values only work at page creation).
  2. Show these fields conditionally (using the when property), depending on the value of the category field.
  3. Optionally reset all unused textarea fields to their default values using a page.create:update hook when the value of the category field changes.

I don’t think there is a way to achieve this otherwise without digging into custom fields.