在PDF格式中,我想编写脚本来计算带有条目的文件 [英] In PDF form I want to write script to count fileds with entry

查看:73
本文介绍了在PDF格式中,我想编写脚本来计算带有条目的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个表单,差不多完成了。我需要在列的底部输入一个总计项目字段,并且无法弄清楚如何为此编写Java脚本。

请帮助吗?



如果该字段为空白,则如果选择了其他4个下拉项中的任何一个,则该字段应为0,其值应为一个,总共可能为20.



我尝试了什么:



发现这个并尝试了但是我收到了语法错误第3行



 var total = 0; 
for(var i = 1; i< = 20; i ++)
{for var f = this.getFieldType 1,Type 2,Type 3,Type 4,类型5,类型6,类型7,类型8类型9,类型10,类型11,类型12,类型13,类型14,类型15,Type 16,Type 17,Type 18,Type 19,Type 20。+ i);
if(f.valueAsString!=。&& f.valueAsString!=Met,FSBO,Exp。+ i)总++; }
event.value = total;

解决方案

那么如果类型#字段是空白以外的其他任何内容,我将如何更正

I'm creating a form and almost done. I need to have a totals items entered field at the bottom of a column and can't figure out how to write the Java script for this.
Help please?

If the field is blank, it should be 0 if any one of the other 4 drop down items are selected, it's value should be one with a total possible of 20.

What I have tried:

Found this and tried it but I'm getting a syntax error at Line 3

var total = 0;  
for (var i=1; i<=20; i++) 
{  for var f = this.getField "Type 1", "Type 2", "Type 3", "Type 4", Type 5", "Type 6", "Type 7", "Type 8" "Type 9", "Type 10", "Type 11", "Type 12", "Type 13", "Type 14", "Type 15", "Type 16", "Type 17", Type 18", "Type 19", "Type 20."+i);  
    if (f.valueAsString!="  ". && f.valueAsString!="Met", "FSBO","Exp."+i) total++;  }  
event.value = total;  

解决方案

So how would I correct that where I'm telling it if the type # field is anything other than blank, count a 1


这篇关于在PDF格式中,我想编写脚本来计算带有条目的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆