on 02-02-2010 2:14 PM
Hi Guru,
I have the requirement to Highlight filed when the field is Read-Only field.
I try to put the code as below for both javascript and FormCalc.
FormCalc
this.fillColor = "224,224,224"
this.border.fill.color.value = "224,224,224"
JavaScript
xfa.form.data.Page1.IT0014.WageType.Amount.fillColor = "224,224,224"
It is nearly work except the Label is also hightlight. What should I add in the code to highlight just only tex field not for both label and text field.
Thanks in advance for your help.
Regards,
Visut
I am not sure but I think there is a simple workaround for this. You can implement some event on a object and in some other event script you can call the first objects event - that means you implement event to change color with JS on some dummy object and from you code you call this "exec event" (I don´t remember exactly) from your FC code.
BTW: if you do not work with webservices and some other minor features then JS is stronger and can do everything what FC can. Maybe you should consider a scripting language switch:))
Otto
p.s.: I am sorry but I cannot write this in FormCalc, I am not strong at scripting at all:)))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Of course you can but 1) why do you care? You can use both in one form and in a single object/ field. 2) you will not be able to use "this" pointer 3) if that is so crucious, adapt the code for yourself:))
Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Otto,
The reason that I ask for Form Calc because some coding that I am currently use is Form Calc. And I need to add this script in between. If Form Calc is not working for this, I need to revise my script and use Java Script instead.
I already try to put the code that Pradeep mention in FormCalc but it does not work. It is working fine with JavaScript. Please let me know what should I put for FormCalc.
Thanks in advance,
Regards,
Visut
Hi Vistul,
I am not that well versed with FormCalc as I use JavaScript. i don't know exactly whether "$.ui" is present in FormCalc, try some ways and there is a way. And as Otto said you can switch to JS as it is a bit stronger, but strictly speaking on performance it is not best to use any scripts in Adobe Forms as recommened by SAP.
Regards
Pradeep Goli
Hi Pradeep,
Thanks a lot for your feedback. I try to avoid script as well but sometimes I believe that there is no way to avoid like the color. User always want something at that time.
Just one simple question, how can I use below FormCalc code in JavaScript?
$record.CONTROL_PARAM.ISR_MODE
Actually this is the way to call the data without place in the form. But I am not sure how can I call record directly like above in JavaScript.
Thanks a lot for your help,
Regards,
Visut
Hi Visut,
You can use this script
//JavaScript
//if listbox - use choiceList, textfild-use textEdit
this.ui.textEdit.border.fill.color.value = "224,224,224";
There are many changes to be done if there are many fields
Read the Scripting
http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
Regards
Pradeep Goli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
An easy solution may be to have remove the label(caption) for your Read Only field and use a separate Text field instead. That way, your color should only affect the field you want
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
you cannot do that at design time? Read-only attribute changes a lot? If you´re in a hurry and not able to find the "right" solution, you can always place mutlitple fields with the same value, colour them at design time and change the presence of these fields.
I will try to look for a scripting solution. Or... maybe you can change the design time attributes of the fields which will change the behavior when scripting... Try "appearance" on tab Object.
Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.