This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

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

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.