New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating array field in collection #424
Comments
I used this in the collection to add in empty data. The edit form from still doesnt show the position as multiple values just the first position in the array. ' |
@maco144 you will get answer few hours after now. |
@maco144 Sorry, I don't fully understand:
|
This is what I get displaying the following component. I want there to show the full positions array and be able to update through a 'select'.
Depth is used to set the position array to size and then it is populated with 'empty'. |
@maco144 sorry, but I still don't understand what you wish to have in the form: do you want multiple "select" inputs (one for each item in the array) or... ? |
@perak Do you have any suggestions? I have tried using a few different methods such as events_code, helpers_code, template_rendered_code, and more without success. |
I am wondering how I can make a field variable in collection into an array. I havent seen documentation or an example on how to.
"name": "rosters", "fields": [ { "name": "position", "title": "Position", "type": "array", "lookup_query_name": "stars", "input": "select", "lookup_field": "name", "lookup_key": "_id", "join_collection": "stars", "join_fields": ["name"], "join_container": "astar" }, { "name": "depth", "title": "Depth", "type": "integer", "min": 2 }
This creates the array of field position but I am unable to populate the field beyond the first array position in any update/insert form. I would like to set the size of the array to depth variable if possible. Help is greatly appreciated!
The text was updated successfully, but these errors were encountered: