yimoc5614452011
yimoc5614452011

Hello

I want to create a defaultvalue for a formfield based on two different fields:

$hour: 4

$payperhour: 80

defaultvalue $sum: hour*payperhour

i'm completely lost on where to beginn, maybe someone can point me in the right direction?

Last updated

Flynsarmy
Flynsarmy

Try searching for this: https://octobercms.com/forum/post/dynamic-default-values-for-form

The calculated default value should come from the model method. Mutators can help with this: https://octobercms.com/docs/database/mutators

1-2 of 2