How to get selected MorphTo type within a dependsOn function? #4817
Unanswered
StanBarrows
asked this question in
Q&A
Replies: 1 comment 2 replies
-
What you can do is actually: $pricelistable = MorphTo::make(__('backend/fields.priceable'), 'pricelistable') /* ... */,
Currency::make(__('backend/fields.value'), 'value')
->sortable()
->readonly()
->dependsOn([$pricelistable, 'percent'], /* ... */), |
Beta Was this translation helpful? Give feedback.
2 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.
-
Heyho,
I've a MorphTo Field and a second readonly field for calculating some dynamic values based on the selected morph to model. How can I get the selected MorphTo model type? On the $formData object there is only the id of the selected model visible. Also within the $request()->all() method.
Output of $formData
Cheers
Sebastian
Beta Was this translation helpful? Give feedback.
All reactions