What are subfields & how can my custom field support it? #608
Unanswered
ziming
asked this question in
Q&A (Help)
Replies: 1 comment 3 replies
-
Hey @ziming happy to help. Subfields are exactly what you have found, they are used inside the "repeatable containers" (Solo, to store as json inside a column, or some relationships like HasOne, BelongsToMany and HasMany (including the Morphs) also support the repeatable interface. They have the same definition as the fields eg: CRUD::field('container')
->type('repeatable')
->subfields([
[
'name' => 'my_subfield',
'type' => 'your_json_field_type'
],
]); Since your field is a If you can provide me an error I can try to find if the issue is on our side, or if we can do something to make it work properly. Cheers |
Beta Was this translation helpful? Give feedback.
3 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, recently I got an issue on my package repo saying that my field does not work on subfield
ziming/json-field-for-backpack#10
However I have never used subfield on backpack before. When i try to search backpack documentation on subfield, it brings me to uploader, repeater and I'm kind of loss on what is subfield about & what special things I need to do to support my field with it
So I decide to ask my question here so I can fix my package
Beta Was this translation helpful? Give feedback.
All reactions