Closed SkidX closed 1 year ago
@SkidX Thanks for detailed reporting but this is not issue. As it is written in the documents:
Default value for the field, which will be used when a page/file/user is created
Hi Ahmet, thanks for the quick reply! Well, if that is the expected behavior, I would say it is still buggy, since the default value is enforced for toggle fields without the need to create a new page, so it is somehow not reliable accross all the field types.
I would also add that it was working as I would expect back in Kirby 2. Clearly the decision is up to you, but I would suggest to consider it as a regression, since it's kind of worse to not have this possibility anymore.
You right! When I examine the toggle field, a definition is made for the default as your said: https://github.com/getkirby/kirby/blob/3.3.3/config/fields/toggle.php#L42-L48
It obviously works similarly when I apply it to the text field, but I have no idea why it is not applied to others except the toggle field. Team members will give us an idea on this issue.
I agree that all fields should use the default value if the field value is empty. I'm not sure why we have this inconsistency right now, maybe @distantnative or @bastianallgeier can tell us more. I assume it was just an oversight.
I just stumbled over this issue, while refactoring some old blueprints. So I do have a lot of files and pages now, which won't reflect default values properly after I changes the templates. I'd appreciate if you guys could have another look on it. :-*
@bastianallgeier There are two options:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.
Describe the bug
The default value of some field types is not showed correctly in the Panel when the field is added to an existing page.
Affected field types I discovered so far: text, textarea, checkboxes, radio, multiselect
Field types not affected: toggle
To Reproduce
Expected behavior
The Architecture checkbox should appear checked, it is not.
Kirby Version
3.3.3
Desktop
Additional context
Inside Builder blocks, the default value of text, textarea and select fields is enforced correctly, while checkboxes, radio and multiselect fail as well.