Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Donny5300's avatar

Custom resource tool -> load on create and edit

Hi! I got a multi tenant application with 3 default plans. Sometimes I want to create a other deal for a user and want to override the plan. I have a form with a price input and a dropdown for relations which refer the plans. When I select a plan, I want that the price is filled in from the selected Plan which has a property with price. Then I created a custom resource-tool but that only loads on the detail page. Is there some way to change that and load the tool on the create and update page?

Maybe I use the wrong approach with the custom resource tool and should I use something else.

0 likes
3 replies
ladicker's avatar

Actually also want to know the same and I think I don't need to post a another one thread related to this topic, Because when get some help from the community I also get the answer...

1 like
Donny5300's avatar

@ladicker I've upgraded my Nova plan and send an e-mail to support. I'll post the answer in this discussion.

Donny5300's avatar

So, I mailed support and heard that the resource tool is not for this purposes. They recommend me to create a custom field. But, in Nova 4 there is a bug for custom fields. A TMP fix for me is go to the /vendor/laravel/nova, run npm install and then the bug is gone. Create a custom field and extend the BelongsToField. I figured out that with the Nova.$on and Nova.$emit, you can update the values for the field attributes.

 mounted(){
        Nova.$emit(this.formUniqueId + '-price_per_year-value', 'Checking if updated')

        Nova.$on('price_per_month-change', function(){
            console.log('YES! IT CHANGED! WHOOOOHOOOOOO')
        })
    }

Please or to participate in this conversation.