Radio Button Value in pdf (javascript calculation) - Stack Overflow

I have a form which I am creating in Adobe Pro. The "Grandtotal" field is determined by a var

I have a form which I am creating in Adobe Pro.

The "Grandtotal" field is determined by a variety of radio buttons selected.

My first step is to give each of the radio buttons a value.

My set of radio buttons is called "Options" - Radio button 1: "15" Radio button 2: "25"

What javascript could I use to put the value of the selected radio button (either 15 or 25) into my "Grandtotal" field ?

I have tried the following:

var option1 = this.getField("Options");
var option2 = this.getField("Options");

var total = this.getField("Grandtotal").value;
event.value = option1 or option2

Thank you

I have a form which I am creating in Adobe Pro.

The "Grandtotal" field is determined by a variety of radio buttons selected.

My first step is to give each of the radio buttons a value.

My set of radio buttons is called "Options" - Radio button 1: "15" Radio button 2: "25"

What javascript could I use to put the value of the selected radio button (either 15 or 25) into my "Grandtotal" field ?

I have tried the following:

var option1 = this.getField("Options");
var option2 = this.getField("Options");

var total = this.getField("Grandtotal").value;
event.value = option1 or option2

Thank you

Share Improve this question asked Oct 31, 2012 at 20:24 user1426583user1426583 3193 gold badges9 silver badges25 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 1

I don't know the use of Javascript in PDFs, but what I found online, it looks like you should use something like this:

var option1 = this.getField("Options1");  // Get first radio button
var option2 = this.getField("Options2");  // Get second radio button
var total = this.getField("Grandtotal");  // Get grand total textbox

if (option1.checked) {
    total.value = option1.value;
} else if (option2.checked) {
    total.value = option2.value;
}

Now, I'm not sure what you mean by my set of radio buttons is called "Options", because that would mean retrieving the radio button fields might be different.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745194552a4616026.html

相关推荐

  • Radio Button Value in pdf (javascript calculation) - Stack Overflow

    I have a form which I am creating in Adobe Pro. The "Grandtotal" field is determined by a var

    1小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信