Replies: 2 comments 5 replies
-
|
@kusab85 I don't understand why you code it as below: Text::make('Title')
->rules('required')
->dependsOn(['user'],
function (Text $field, NovaRequest $request, FormData $formData) {
logger(get_class($this).": User changed to ".var_export($formData->user, true));
}
)
->dependsOn(['status'],
function (Text $field, NovaRequest $request, FormData $formData) {
logger(get_class($this).": Status changed to ".var_export($formData->status, true));
}
)
->dependsOn(['created_at'],
function (Text $field, NovaRequest $request, FormData $formData) {
logger(get_class($this).": Created at changed to ".var_export($formData->created_at, true));
}
),If |
Beta Was this translation helpful? Give feedback.
3 replies
-
Text::make('Title')
->rules('required')
->dependsOn(['user', 'status', 'created_at'],
function (Text $field, NovaRequest $request, FormData $formData) {
ray(get_class($this).": User changed to ".var_export($formData->user, true));
ray(get_class($this).": Status changed to ".var_export($formData->status, true));
ray(get_class($this).": Created at changed to ".var_export($formData->created_at, true));
}
), |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
crynobone
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.
-
Open Posts page and edit a Post.
Callback function is called only once when page is being loaded.
After that, changing value of the User field does not do a thing.
Just look into laravel.log
Cheers!
UPDATE:
It seems that dependsOn doesn't work at all, no matter what field uses it.
Check 'Post With Dependencies' page in my TestApp
Originally posted by @kusab85 in #4751 (comment)
Beta Was this translation helpful? Give feedback.
All reactions