jasonwong
jasonwong

I have two fields that are price and first_price, I want the first_price value automatic update when the price value changed, first_price value will calculated by the value of price.

My form_fields.yaml:

price:
    label: Price
    type: number

first_price:
    label: First Price
    span: left
    type: number
    depends: price

where definition the handler function when price are change, I want return specified value to the first_price filed in that handler function. Who can help me? Thanks!

Last updated

jasonwong
jasonwong

Still not find a way, can someone help me.

KurtJensen
KurtJensen

I am trying to solve a similar problem. I think what we might need is a Form Widget. See: http://octobercms.com/docs/backend/widgets#form-widgets I won't have time till later tonight to look at this further. If you figure it out first then please post back.

1-3 of 3