Hmmm - in that thread, the most elaborate example contains this:
-on_refresh {
# didn't use -on_refresh
# set subcategory_options before ad_form
# because I couldn't find a way to set them here
}
So at least I am not alone with my problem 😊
Another post lead me to this solution for doing what I want to do:
-on_refresh {
template::element::set_value homepage_edit hp_title REFRESHING
}
I would have assumed that ad_form_set_value would work also, but it doesn't. It doesn't give an error either. Strange.