[Scribus] (Bump) PDF Form calculations

Thomas Worthington tscribus
Fri Mar 2 14:29:07 CET 2007


On Thu, 01 Mar 2007 18:53:02 -0000, MaHan <ma_han2000 at yahoo.de> wrote:

>
> Gosh, I haven't done it for years, bug we cannot allow
> that you turn your back on Scribus and play with the
> nasty, nasty Acrobat, can we:)
>
> Anyway: you need 2 text fields, name them field1 and
> field2 and a check box for VAT, name it  checkbox1:
>
> field1: it's for entering the price, set its format to
> 'number'
>
> field2: set it to read only and its format to
> "number", go to the calculate tab, and enter this
> custom script (hackers on the list please forgive
> me:):
>
> //start
>
> var f = this.getField('field1');
> var v = this.getField('checkbox1');
> if(v.value=='Yes')
> 	var vat = f.value * 0.175;
> else
> 	var vat = 0;
>
> event.value= f.value * 3 + vat;
>
> //end
>
> I'm attaching two test files for you to play with
>
> cheers
> Maciej

That's great; thank you very much. I was being confused by the "event"
object usage. All working now.

Thomas



More information about the scribus mailing list