合并两个文本字段后,如果我更改它,它不会更新 [英] After combining two text fields if I change one it does not update

查看:84
本文介绍了合并两个文本字段后,如果我更改它,它不会更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是Adobe Acrobat 9.0中的PDF表单设置

这是我的脚本。它工作得很好但是如果我稍后更改名字我的全名字段

不会改变。请帮助





//获取字段值,作为字符串

var s1 = getField(First .Name)。valueAsString;

var s2 = getField(Last.Name)。valueAsString;



//组合值,以空格分隔

event.value = s1 ++ s2;



我尝试过:



//获取字段值,作为字符串

var s1 = getField(First.Name)。valueAsString;

var s2 = getField(Last.Name)。valueAsString;



//组合值,用空格分隔

event.value = s1 ++ s2;

This is a PDF Form setup in Adobe Acrobat 9.0
This is my script. It works great but if I change first name later my full name field
does not change. Please Help


// Get the field values, as strings
var s1 = getField("First.Name").valueAsString;
var s2 = getField("Last.Name").valueAsString;

// Combine values, separated by a space
event.value = s1 + " " + s2;

What I have tried:

// Get the field values, as strings
var s1 = getField("First.Name").valueAsString;
var s2 = getField("Last.Name").valueAsString;

// Combine values, separated by a space
event.value = s1 + " " + s2;

推荐答案

您没有提供足够的信息(PDF版本,脚本如何触发等等) ..),我猜你在某个地方放错了脚本。还要确保存在First.Name和Last.Name的文本框。



在编辑表单视图中,右键单击全名文本框,选择属性,单击计算选项卡,选择自定义计算脚本,单击编辑...并粘贴您的脚本



You didn't provide enough information (PDF version, how the script get trigger, etc...), I'm guessing you misplacing the script somewhere. Also make sure textbox with First.Name and Last.Name exists.

In Edit Form View, right click the Full Name Textbox, select properties, click on the Calculate tab, select Custom calculation script, Click on Edit... and paste in your scripts

var s1 = getField("First.Name").valueAsString;
var s2 = getField("Last.Name").valueAsString;
event.value = s1 + " " + s2;





之后,单击确定并关闭。返回表单预览,更改First.Name或Last.Name文本框中的值,然后单击表单上的某个位置,全名字段应根据First.Name和Last.Name值的组合进行更改。



After that, click OK and Close. GO back to form preview, change the value in First.Name or Last.Name textbox, then click somewhere on the form, the full name field should change based on the combination of First.Name and Last.Name value.


这篇关于合并两个文本字段后,如果我更改它,它不会更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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