Update form field from page action

Hi all, I feel like this is relatively simple Livewire stuff but I can't figure it out. I'm trying to dynamically update a field from a page action in my EditRecord class, I've tried a few different things without any luck :

class EditProduct extends EditRecord
{
    // ...

    public function calculatePrice()
    {
        $this->price_retail = 123.45;

        $this->data['price_retail'] = 123.45;

        $this->form->evaluate(fn (Closure $set) => $set('price_retail', 123.45));
    }
}


Am I getting warmer?
Was this page helpful?