Blueprint: How to set the default to the person logged in


I have added the author field to my blog pages in the blueprint, but I want to set the default to the person, who is writing the blog article. That should come from the login.

How can I do that in the blueprint like „default: today“ in for a date field?

Thanks for your help.

I am not aware of any built-in solution. What I am thinking could be a way is:

  1. Create a new custom form field:
  2. Could be based on the select field:
  3. Add all users as select options by looping through $users:
  4. Make the current user the pre-selected/default one by using $user->isCurrent():
1 Like

Thanks for your topic, but I want to know, what I can add at my blueprint as an “built-in solution” like “default: today” at

And as I said, I don’t think that there is any built-in way to achieve this. That’s why I suggested a way to realize it without the needs to fill in an empty author text field.

But I agree, would be nice to have such a thing as a default option.

Something like this should work (at least it did in a quick test):
I only quickly threw it together, but it should be it more or less – still not ‘built-in’, but as a custom form field it’s as clean as it gets, if you actually need it.

Just put it as author.php in site/fields/author/ and use in your blueprint type: author

1 Like


Many thanks for your very nice work. It looks best.

I have tested it.

It works exactly the way I wanted it.


Do you include this in the next Kirby version?

With the last this field prevents the input from to be saved.

Something is wrong. :disappointed_relieved: