These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Acrobat change textfield into combo box & combobox sum script

Hope-acrobat
Registered: Nov 18 2010
Posts: 3

Hi,
 
I was hoping someone will be willing to try and help me understand what to do with javascript- acrobat and forms.
 
I took a look at some tutorials because i'm really new to this.
So i managed to make a form layout in indesing and let acrobat trace it rename what was necessaire.
 
i managed to fil in a normal sum and that worked but i would really like the table to expand or delete a row using a "Button +" and "Button -"
 
And make of the btw% colom a combobox "BTW %" with the 6% and value 0,06 and 19% with value of 0,19 and automaticly calculate the price in "BTW €" colum depending on the choice.
 
i did that the normal way by multiplying the value with the "Netto €" colum but in that way i dont think i can make the form fill in the totals in a price specified for the % in the bottom fields;
 
Totaal ex. BTW
Totaal BTW 6%
Totaal BTW 19%
 
I would really be grateful if someone can do an example and explain how to make that and why it workst that way so i can figure iy out myself in the future maybe.
 
(button-)
colums; Artikel Omschrijving Stukprijs Aantal Netto€ BTW% BTW€
(button+)

Thank you very much for responses.

* im blond but do wanna try ;)

My Product Information:
Acrobat Pro 9.4, Macintosh
Hope-acrobat
Registered: Nov 18 2010
Posts: 3
I now have the colum values working but still no good script for totals of all btw € tried

var nBtwnettoTotal = this.getField("Btw-netto").value;
var nPercBtw = this.getField("Perc-btw").value;

if( nPercBtw.value = 0.06)
event.value = nBtwnettoTotal;
else if( nPercBtw.value = 0.19 )
event.value = 0;


but i dont know why it doesnt work the values fr the combo choices are 0.06 or 0.19

also tried:

var nBtwnettoTotal = this.getField("Btw-netto").value;
var nPercBtw = this.getField("Perc-btw").value;
var n19 = this.getField("Totaal-BTW-19");

if( nPercBtw = 0.19 )
{
event.value = nBtwnettoTotal;
}
else( nPercBtw = 0.06 )
{

event.value = 0;
}

and

var nBtwnettoTotal = this.getField("Btw-netto").value;
var nPercBtw = this.getField("Perc-btw").value;
var n19 = this.getField("Totaal-BTW-19");

if( nPercBtw = 0.19 )
{
event.value = nBtwnettoTotal;
}
else( nPercBtw = 0.06 )
{

n19 = 0;
}

besides that i entered auto date fill js. but can someone plz help me se where im going wrong? and maybe help me on expanding and deleting row issue?

* im blond but do wanna try ;)

Hope-acrobat
Registered: Nov 18 2010
Posts: 3
I got that working now. Can someone shine a light on how you make rows expand to more rows after clicking a button?
i cant seem to get that working. Thank you in advance

* im blond but do wanna try ;)