[Solved] Attribute form defaults: How to take over the settings directly when duplicating the layer (and not afterwards by copy-paste-styles)

jaysigg Asks: Attribute form defaults: How to take over the settings directly when duplicating the layer (and not afterwards by copy-paste-styles)
I have a point-shapefile-layer with attribute form defaults for some fields, QGIS 3.16 (see image, red marks). If I now duplicate the layer (by exporting or by duplicating) these attribute form settings are not taken over in the new layer and the fields remain empty. Of course I can reassign the fields by copy-and-paste-styles afterwards.
But is there any option (by general settings, or …) to take over the attribute form defaults when creating the new layer and not to reassign them afterwards?

[

{
“lightbox_close”: “Close”,
“lightbox_next”: “Next”,
“lightbox_previous”: “Previous”,
“lightbox_error”: “The requested content cannot be loaded. Please try again later.”,
“lightbox_start_slideshow”: “Start slideshow”,
“lightbox_stop_slideshow”: “Stop slideshow”,
“lightbox_full_screen”: “Full screen”,
“lightbox_thumbnails”: “Thumbnails”,
“lightbox_download”: “Download”,
“lightbox_share”: “Share”,
“lightbox_zoom”: “Zoom”,
“lightbox_new_window”: “New window”,
“lightbox_toggle_sidebar”: “Toggle sidebar”
}

enter image description here

][

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.