You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a feeling there is a different, easier way to do this that I am missing, but what I was able to do in Nova 3 with a package epartment/nova-dependency-container was to conditionally render a field type based on the value of a select menu.
So what I'm trying to achieve is that when you select Text from the dropdown you get a Text input field, but if you select TextArea from the dropdown you get a TextArea, Boolean, Date, Trix or whatever.
This won't work because it is treated as multiple fields with the same name. ie. it will work if the fields are Value1, Value2, Value3 but not if I want just Value to be stored in a TEXT field in my db regardless of the field input type. (It's for a content management thing).
Is there any way of achieving this? I really liked the NovaDependencyContainer flexibility but unfortunately it's been abandoned.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a feeling there is a different, easier way to do this that I am missing, but what I was able to do in Nova 3 with a package epartment/nova-dependency-container was to conditionally render a field type based on the value of a select menu.
So what I'm trying to achieve is that when you select Text from the dropdown you get a Text input field, but if you select TextArea from the dropdown you get a TextArea, Boolean, Date, Trix or whatever.
And this would allow me to display a field type based on the selection.
This doesn't seem possible in Nova 4 since you can only have a dependsOn on one distinct Field. So this doesn't work:-
This won't work because it is treated as multiple fields with the same name. ie. it will work if the fields are Value1, Value2, Value3 but not if I want just Value to be stored in a TEXT field in my db regardless of the field input type. (It's for a content management thing).
Is there any way of achieving this? I really liked the NovaDependencyContainer flexibility but unfortunately it's been abandoned.
Beta Was this translation helpful? Give feedback.
All reactions