Copy link to clipboard
Copied
Hi Everybody! Happy Weekend!
I'm creating a PDF document that has room for 8 license numbers at the top. Anywhere from 1 to 8 of those license numbers may need to be included when filling in the document.
I was setting it up with 8 dropdown lists (two columns of four) and each list has all of the license numbers in it so that the numbers can be chosen as needed, and if less than 8 then the unchosen ones remain invisible when it occurred to me that there might be a better way. Not that I don't dislike this method but still...
I'm loving the camaraderie here so I thought I'd jump in and ask ... any thoughts?
Thank you so much!
Diane
Copy link to clipboard
Copied
One possible option is to use a text field, with a button to populate it with the selected numbers from a pop-up menu. Each item you select will be added to the text field, so you end up with a list of numbers in one field. It can be a multi-line field, or they can be separated with a comma, for example. Doing it will require using a script, of course.
Copy link to clipboard
Copied
One possible option is to use a text field, with a button to populate it with the selected numbers from a pop-up menu. Each item you select will be added to the text field, so you end up with a list of numbers in one field. It can be a multi-line field, or they can be separated with a comma, for example. Doing it will require using a script, of course.
Copy link to clipboard
Copied
Hi! 🙂
Thank you! I like that!
I'm wondering if I might be able to use that for the "scope of work" field as well. If there are say 5 scopes of work, each is different from the other, maybe 3 or 4 paragraphs in each scope, I could use your suggestion to populate the "scope of work" field instead of typing the text in or copying it from another document and pasting it in (as long as the text in each scope of work stays the same).
Does that make sense?
Thank you again!! 🙂
Copy link to clipboard
Copied
Yes, you can use a script to populate a text field based on the selection(s) the user makes, if that's what you mean...
Copy link to clipboard
Copied
Yep, that's what I meant! Thank you so much! I might be back to ask for help with the script. 🙂
Have a great day and thank you again! 🙂
Copy link to clipboard
Copied
Hi Try67! 🙂
I was wondering, would this work when the scope of work spans 3 pages?
The end user has huge scopes of work. He was planning on pasting the scope of work into the field but it's more text than one page/field (the field covers the whole page) can hold.
I need to figure out how to make the text that he copies and pastes into the field automatically send the overflow text to the next field, and then a 3rd field if needed. Otherwise he has to copy the text, paste it into the first field, then go back and recopy whatever didn't fit into the first field to paste that text into the 2nd field, and so on - or find a different solution.
Thank you, again, so much!! 🙂
Copy link to clipboard
Copied
Doing it automatically is very tricky, as it would require calculating how much text can fit in a text field, and that's very difficult to do, unless the font used is monospaced.
Copy link to clipboard
Copied
Thank you! You're quick! 🙂
So it sounds like his only solution is how I laid it out: copy the block of text and paste it into the 1st field, then go back to the copy source and re-copy the text from the point that it didn't fit into the 1st field and paste that into the 2nd field, and so on?
Are there any other solutions that you're aware of?
Thank you again so much!!
Copy link to clipboard
Copied
Yes, although you could try and "guess" how to split the text, with a wide margin for errors.
Copy link to clipboard
Copied
Thank you again so much, you've been so incredibly helpful to me!! 🙂 I'm sure I'll be back, lol...
Copy link to clipboard
Copied
Hi Try67!
I don't have a solution but I did figure out an easier workaround. 🙂
I set the fields up to "scroll" so now he can paste all of the text in and then cut what scrolls, so to speak, and paste it into the next field, and so on. That way at least he doesn't have to go back to the source to continue to copy only what didn't paste into the prior field. 🙂
Fingers crossed that he's okay with that.
Oh, also, there might be a solution, or at least the start of one, for those using Pro (I'm using Standard). Something to do with On Focus and On Blur in Properties > Actions ... (it's beyond my understanding, just sharing in case you might find it interesting) 🙂
On Focus (run a java script)
var a=this.getField("AC1_3");
var j=this.getField("AC1_2");
var x=this.getField("Assessment_Comments");
if (x.value.length>0) {
var astr = a.value;
var jstr = j.value;
var xstr = x.value;
if (a.value.length>0) {
jstr = astr;
}
a.value = xstr + " " + jstr;
x.value = "";
j.value = "";
x.display=display.hidden;
}
On Blur (run a java script)
var a=this.getField("AC1_3");
var b=this.getField("AC1_con");
var j=this.getField("AC1_2");
var x=this.getField("Assessment_Comments");
if (a.value.length>80) {
var astr = a.value;
var alen=astr.length;
var lastsp=astr.lastIndexOf(" ",56);
var savestr=astr.substr(0,lastsp);
var movestr=astr.substring(lastsp+1,alen);
x.value=savestr;
if(a.value.length>200) {
j.value="**See Attached**";
a.value=movestr;
a.display=display.visible;
b.display=display.visible;
} else {
j.value=movestr;
a.value="";
a.display=display.hidden;
b.display=display.hidden;
}
} else {
x.value = a.value;
j.value = "";
a.value = "";
a.display=display.hidden;
b.display=display.hidden;
}
x.display=display.visible;
In my searching I came across other posts at other websites with basically the same question. One person posted this but indicated that it's not perfect, it still has issues.
Thank you again and have a great day!