Closed holubar closed 2 years ago
We should have dependsOn support, though I haven't used it myself yet. Can you share your fields setup.
This is how I try to use it. Result is, that it's always hidden. This works on all standard Nova fields, only Color is always hidden.
Color::make(__('app.background').' - '.__('app.color'), 'properties->section_background_color_code') ->compact() ->palette(Helpers::tailwind_color_array('simple')) ->hideFromIndex() ->help(color_palette_link()) ->dependsOn('type', function (Color $field, NovaRequest $request, FormData $formData) { if (!PageContent::display_heading_first_line_options($formData->type)) { $field->hide(); } })
Thank you for help
Is there any way to achieve showing/hiding color fields? Should I use your dependency container package?
Version 2.0.2 ships with improved dependsOn support. Can you try again? Thanks!
works :)
Is there a way to change the color value when using depends on?
I cannot seem to get it working under Nova 4. Is it supported? I could really use it in my project.