Two fields, two scripts. User can enter data into field 1 or 2


hi all,

 

new here, , acrobat forms, please bear me!

 

what i'm trying achieve form calculates total invoice value, based on total number of hours worked, , rate. user fills in total hours, problem people know fixed rate, , others have changing rate. changing rate know amount invoicing for. i'd like, way totalinvoice value calculated rate*totalhours when user enters value rate field... or ... rate calculated totalinvoice/totalhours when user enters value totalinvoice field.

 

i can make go 1 way or other (so script in totalinvoice field or rate field), can't manage go both ways. possible?

 

to summarise: user can enter manually field1 , value of field2 calculated, or user can enter manually field2 , field1 calculated.

 

thanks!

what propose can difficult, becuase you're describing circular reference between 2 fields. when 1st value changes, want 2nd value calculated based on 1st value. when 2nd value changes, want 1st value calculated based on 2nd, ad infinitum. there ways short-circuit loop, depends on whether need calculation when there manual entry, or whether need work when either field value changes programmatically or importing form data.

 

sometimes it's easier have user press button calculate , set other field value.



More discussions in JavaScript


adobe

Comments

Popular posts from this blog

How to decompile jsxbin to jsx

Gavik Photoslide GK2: Not able to upload photos - Joomla! Forum - community, help and support

Phoca Guestbook logger registret bruger af - Joomla! Forum - community, help and support