Hi everyone,
Is it possible somehow to create an irregular shaped text field? The paper form I am working on has a short line for the first line and full length lines for the next set of lines. If that isn't possible is there a way to create a short field for the first line that I can make jump to the full size text field when the short field becomes full? Or maybe create a full size field for the form and then mask out the first x number of character on the first line? I can't change the format of the form and I don;t want to "waste" the first short line. I am familiar with scripting so if that is a potential solution I should be able to take that route fairly easily.
Any suggestions for a way to go will be greatly appreciated.
Bruce
Views
Replies
Total Likes
I'm not sure that I follow but I'll give it a shot.
1) "...is there a way to create a short field for the first line that I can make jump to the full size text field when the short field becomes full?"
firstName is 65mm (2.5591in) wide and maximum characters set to 10
lastName is 100mm (3.937in) wide and maximum characters set to 35
When you type the 10 character into firstName the field width is resized to 100mm.
My solution may expose my ignorance of the event model. The firstName change event fires the firstName full event when the 10th character is entered.
// form1.page1.subform1.firstName::change - (JavaScript, client)
if (xfa.event.newText.length > 9) {
this.execEvent("full");
}
The full event resizes the width to 100mm and fires the initialize event.
// form1.page1.subform1.firstName::full - (JavaScript, client)
this.w = "100mm";
this.execEvent("initialize");
2) "...create a full size field for the form and then mask out the first x number of character on the first line?"
You can doing masking pretty easily. I added a second field to host the value before it is masked assuming you want to be able to use the original value in the output data.
// form1.page1.subform1.maskedField::exit - (JavaScript, client)
if (this.isNull) {
form1.page1.subform1.hiddenField.rawValue = null;
}
else {
var str = this.rawValue;
form1.page1.subform1.hiddenField.rawValue = str;
// mask the first 5 characters
str = "*****" + str.substring(5,str.length);
this.rawValue = str;
}
Steve
Views
Replies
Total Likes
Steve,
Thanks for the reply. I think either one of these will work and I will give them a try.
I think I didn't make myself clear enough so here is what I am working with. I have a paper form that I am making into an Adobe form. It is a series of questions. AN example is like this...
Tell us about yourself
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies