on 08-14-2013 6:51 AM
Hello Everybody,
I am new in Adobe Forms and I have a problem in formatting background colour of a text-field in my form.
I have designed in my form a calender.
Every day is a text-field. Now I want to set the background colour to grey if the field is a sunday.
Now my question is this possible only with scripting?
Could you give me some help?
Thanks a lot
Sigi
Hi Sieg,
Scripting would be one option, but setting 52 fields using script would be difficult. Instead you could use this approach.
1. Group Jan 1st, Jan 8th, Jan 15th, .. +7 days,... in group 1. (As these days will be having same day in all years)
2. Group Jan 2nd, Jan 9th, Jan 16th.... in group 2. like wise make 7 groups.
3. In a group, make sure all fields have same names.
4. Now on a subform, write this script in javascript.
var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);
for (var i=0; i <= fields.length-1; i++) {
if (fields.item(i).name == "FIELDNAME") {
fields.item(i).fillColor = '<Fill your color combination>';
}
}
--
Rakesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sieg,
Honestly I do not understand how your calender works.
Are you generating any year 's calender dynamically using script, and to change background of Sunday to grey?
Inside your loop, check if it is sunday, change the cell 's background to grey.
Some sample script to change the background color.
http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000833.html
Hope this helps.
regards,
Xiang Li
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.