Repeater fields don't support default values #6666
Unanswered
WladGin
asked this question in
Ideas & Feature Requests
Replies: 1 comment 2 replies
-
This is not idea or feature request - this is a bug. I don't understand why this ticket was moved from issues to Ideas & Feature Requests |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
Unable to add default values for the Repeater field. The most interesting thing is that in the browser, in the network there are these values that I pass, but they are not displayed in the form.
Detailed steps to reproduce the issue on a fresh Nova installation:
I created a custom action, added it to the resource in the method
For example, you can create a single record through the resource and use it as the default value.
We get a database record like this
[{“type”: “question-for-survey”, “fields”: { “survey”: “The project environment was motivating and collaborative. I hope we have more projects like this.“}}, {”type": ‘question-for-survey’, ‘fields’: {“survey”: “Kindness and encouragement were evident throughout the project.”}}, {“type”: “question-for-survey”, “fields”: {“survey”: “The field crew was well-coordinated and managed effectively.”}}, {“type”: “question-for-survey”, “fields”: {“survey”: “The project team provided clear guidance, support and timely follow-up throughout.”}}, {“type”: “question-for-survey”, “fields”: {“survey”: “The team demonstrated great aligment with our core values.”}}]
.Then in the action class “ReplicateAndUpdate” we get the resourceId through the requester and if there is data - set it as default (the ProjectSurvey model has a cast to convert the survey field to an array). The method looks like this:
After that, it is impossible to run the action, but we can see that the value field is filled and there are values in it

Beta Was this translation helpful? Give feedback.
All reactions