I have a couple of queries regarding tabulating.
1. Are we able to set tab stops at different intervals besides the default ones already set and if yes, how?
2. Is there anything that I can do that will speed up the tabbing process? e.g. the time it takes to go from one field to the next.
3. Is there anything that I can do that will make it clearer (when tabbing) where you are actually at in the form? e.g. making the 'Highlight Fields' option a default at the time of opening the document.
Thanks
Jen
Solved! Go to Solution.
Views
Replies
Total Likes
Re: Tabs - if you mean tab stops in fields this might help:
http://blogs.adobe.com/formfeed/2009/06/managing_tab_stops_in_fields.html
Not sure about speeding up tabbing.
Turning on field highlighting:
Put this in the Layout:Ready event of the main form:
if (!app.runtimeHighlight){
app.runtimeHighlight = true;
}
You can also change the colour of the highlight:
app.runtimeHighlightColor = color.cyan;
or
app.runtimeHighlightColor=["RGB",.8,1,.8];
On the Layout:Ready event.
You can find more info on color arrays in the Acrobat JavaScript scripting reference.
Views
Replies
Total Likes
Re: Tabs - if you mean tab stops in fields this might help:
http://blogs.adobe.com/formfeed/2009/06/managing_tab_stops_in_fields.html
Not sure about speeding up tabbing.
Turning on field highlighting:
Put this in the Layout:Ready event of the main form:
if (!app.runtimeHighlight){
app.runtimeHighlight = true;
}
You can also change the colour of the highlight:
app.runtimeHighlightColor = color.cyan;
or
app.runtimeHighlightColor=["RGB",.8,1,.8];
On the Layout:Ready event.
You can find more info on color arrays in the Acrobat JavaScript scripting reference.
Views
Replies
Total Likes
Thanks Jono,
I have the automatic highlight scripting working but I am unable to get the highlight to change colour. I'm not sure if i'm putting the scripting in the correct place or it I need any additional coding.
This is what I have.
if
(!app.runtimeHighlight)
{
app.runtimeHighlight
=true;
app.runtimeHighlightColor
=color.cyan;
}
Jen
Views
Replies
Total Likes
Or
if (!app.runtimeHighlight)
{
app.runtimeHighlight = true;
app.runtimeHighlightColor=["RGB",135,120,226];
}
Views
Replies
Total Likes
I've got the colour statement outside of the if statement - that way if highlighting is already on the colour will still change. Other than that it looks like your script should work - the first one you posted, your RGB colours in the second example should be out of 1 not 256.
if (app.runtimeHighlight){
app.runtimeHighlight = false;
}
app.runtimeHighlightColor=["RGB",.8,1,.8];
One thing I haven't figured out yet is that the runtimeHighlightColor setting seems to change the actual Acrobat preference and the colour will stay changed - I need to figure out how to get the current value and try and return it when the document gets closed.
Views
Replies
Total Likes
Hi Jono,
How about running your script on the docClose event???
app.runtimeHighlightColor=["RGB",.8,.84,1];
???
N.
Views
Replies
Total Likes
That's what I was thinking - need to figure out how to store and retrieve the previous setting when I get a chance.
Views
Replies
Total Likes
Is there anywhere that I can find a list of the color codes (RGB's)?
Views
Replies
Total Likes
I have been able to get the docClose to work.... Use app.runtimeHighlightColor=["RGB",.8,.84,1]; and it converts the color back to the original default color. Yippee!!! Thanks guys.
Views
Replies
Total Likes
Expanding further, I have the changed the highlight colour to blue upon opening the doc and turning off upon closing the doc. Is there anyway that I can have the highlight colour turn off once the field / cell has been enetered? This will enable our clients to establish what still needs to be entered on the form as the fields not completed will still be highlighted in blue!
Jen
Views
Replies
Total Likes
Hi,
It's good you got it working.
When you turn the highlight function on and off, it applies to all fields. As I understand it you would like to turn the hightlight off as each field is completed by the user.
This is not possible with the highlight function, but it is possible by scripting for the user interface.
Start by turning off the highlight on Layout: Ready event.
Then set the fill of all of your fields that you want this feature to the default blue shading Adobe has for the highlight function. Object / Field tab; Appearance / Custom; RGB = 204;215;255.
Then you will need the following Javascript in the Validate event of each field:
var vName = this.name.toString(); // variable to hold name of object
var fld = xfa.resolveNode("form1.page1." + vName + ".ui.#textEdit.border.fill.color");
if (this.rawValue != null) {
fld.value = "204,215,255"; //keep the blue shading
}
else {
fld.value = "255,255,255"; // turn off shading if field has value
}
The only thing you will need to change in the script is the #textEdit, depending on what the field is. The example above is for a textfield. The corresponding values for different fields are given below:
Date field = #dateTimeEdit
Dropdown = #choiceList
Checkbox = #checkButton
Text field = #textEdit
Numeric field = #numericEdit
Also watch out for the "form1.page1." in the resolve name script, you will also need to change these to reflect the structure and naming convention in your form.
Hope that helps,
Niall
Views
Replies
Total Likes
I don't think there's a list of codes per se... I got the info from the Acrobat Javascript Reference. If you are trying to match a specific colour it might take some work.
I think you can get the most recent version here: http://www.adobe.com/devnet/acrobat/javascript.html Download the pdf and search on "color array."
Note to Adobe folks re: documentation:
It can be difficult to track down the correct versions of references, there are too many old versions of pdfs kicking around the Adobe site and too many places to find them! It would be nice if there were version numbers/dates in the file names so you know what you're getting.
Views
Replies
Total Likes
Further to Niall's tips, check out the FormFeed blog for some great code for handling mandatory fields and validation.
http://blogs.adobe.com/formfeed/2008/11/validation_patterns_part_3.html
Views
Replies
Total Likes
Hi,
Also check Adobe's Kuler www.kuler.adobe.com It is great for matching complementary colours for your forms. It will give you the red, green, blue values in the standard scale of 0 to 255. This scale is what you need for setting colours and scripting for object colours in LC Designer. However when scripting to change the behavior of Acrobat itself (like Jono's script), you are reverting to core javascript where the RGB scale is 0 to 1.
So if you have a colour in the RGB 255 standard scale and you need it in fractions (not that often), just divide each value by 255 and the colour will match in the 1 scale.
Good luck,
N
Views
Replies
Total Likes
Hi,
Also check Adobe's Kuler www.kuler.adobe.com It is great for matching complementary colours for your forms. It will give you the red, green, blue values in the standard scale of 0 to 255. This scale is what you need for setting colours and scripting for object colours in LC Designer. However when scripting to change the behavior of Acrobat itself (like Jono's script), you are reverting to core javascript where the RGB scale is 0 to 1.
So if you have a colour in the RGB 255 standard scale and you need it in fractions (not that often), just divide each value by 255 and the colour will match in the 1 scale.
Good luck,
N
Views
Replies
Total Likes
Hi All,
I was going through this post. I am having a requirement in which I need to change the text of "Highlight Fields" button showed up on a purple bar in the Adobe reader. Please let me know if this is feasible. If yes, do share the script for the same.
Form will be developed in Adobe LiveCycle Designer.
Thanks and Regards,
Ambika Mittal
Views
Replies
Total Likes
Hi,
No. you do not have scripting access to the actual button at all.
All you can do is script to turn on and off the highlight and change the colour of the highlight. See here: http://assure.ly/jiZ6tn.
Hope that helps,
Niall
Views
Replies
Total Likes