since ‎30-06-2013
‎10-12-2019
Geckoz100
Level 3
Re: Drop Down List With Multiple Email Addresses Geckoz100 - Adobe LiveCycle
It actually does work, but for some reason only on the second click. When I first clicked it just moved the page to the top, then I scrolled down to the post with the attachment, clicked it again, and the download started.
11595
Views
0
Likes
0
Replies
Re: How can I reuse a script to set variables? Geckoz100 - Adobe LiveCycle
Thanks, Mattias, that helped a lot. I was confused because I didn't understand the names related to each other, so your example clarified that. I found that one other thing I had to do is set my variables as universal variables in Form Properties, because they would not carry over to where I was calling them from when I ran the script. So ended up having to use ".value" for the variables. I have a bunch of submit buttons on this form, so I needed a way to create a consistent set of headings acro...
1693
Views
0
Likes
0
Answers
How can I reuse a script to set variables? Geckoz100 - Adobe LiveCycle
I have a script to set some variables and I need to run the script many times throughout the form, for different users at different times. How can I set up the script as an object in Variables and call it when I need to run it? Greatly appreciate any help. I'm using ES3.var emailSubject = "";var cleanDate = Page1.EventDetails.Block2.SpeakingDate.rawValue.replace(/[\/]/g, "-");var eventName = Page1.EventDetails.Block1.EventName.rawValue;var eventCity = Page1.EventDetails.USaddress.CityEvent.rawVa...
2863
Views
0
Likes
3
Answers and Comments
Re: How to convert lowercase to uppercase characters? Geckoz100 - Adobe LiveCycle
The best method is to change the text to uppercase as it's being typed in:Add this to the "change" event:xfa.event.change = xfa.event.change.toUpperCase();
1890
Views
0
Likes
0
Answers
Re: Simple email validation in forms Geckoz100 - Adobe LiveCycle
FulufheloMM, could you please explain exactly how that works?
2971
Views
0
Likes
0
Answers
Re: Remove a subform permanently using javascript Geckoz100 - Adobe LiveCycle
Thanks, I checked the "Preserve scripting changes" setting and it was already set. I had only one field set to global binding, so I disabled that and it still had the same problem. I do have a lot of the same field names in both sections, such as Departure Date, Return Date, etc.. It would be too much work to rename them all to unique names. The solution I found was to put a script in the docReady event of the main selector button (Domestic/Foreign), to re-apply the setInstances count when re-op...
1706
Views
0
Likes
0
Answers
Re: Remove a subform permanently using javascript Geckoz100 - Adobe LiveCycle
Sorry, I cried victory too soon..... The form seems to "forget" that the instance was set to zero, and after I save it and reopen it, the previously deleted instance shows up with all blank fields. I've got the form saving to version 9.1 and later. Any ideas?
1693
Views
0
Likes
0
Answers
Re: Remove a subform permanently using javascript Geckoz100 - Adobe LiveCycle
Thanks, SI_MSD7, it works!
1688
Views
0
Likes
0
Answers
Re: How to force alpha or numeric inside text fields - LiveCycle Designer 9.0 Geckoz100 - Adobe LiveCycle
I figured it out! It just needs to be like this://replace @ with "@domain.com"if (xfa.event.change == "@") { xfa.event.change = "@domain.com";}So it will generate the suffix string only when you press "@", and it allows corrections without duplication, etc.
2031
Views
1
Like
0
Answers
Re: Make fields required in expanding table Geckoz100 - Adobe LiveCycle
Hello,I can't send you the form because it's an internal government form. But please tell me what the issue is. I have since adopted a different method of handling this situation -- I simply make the fields in the new row required and the general form validation handles any empty field errors upon submitting. If you need to hide/show the table dynamically or make the fields required/not required dynamically, you have to add some scripting to make the fields in the new row mandatory. For some rea...
1448
Views
1
Like
0
Answers
Re: How to force alpha or numeric inside text fields - LiveCycle Designer 9.0 Geckoz100 - Adobe LiveCycle
Thanks, Radzmar, it works! But there's one little issue -- if I press the Backspace key to make a correction, or even type in any other letters, it adds another "@domain.com" with every keystroke. The only way I have found to get around it is to manually select the entire portion containing all the ampersands and then press Delete. Any way to solve that?
2026
Views
0
Likes
0
Answers
Re: How to force alpha or numeric inside text fields - LiveCycle Designer 9.0 Geckoz100 - Adobe LiveCycle
Hi all,In addition to my question above, I have another: I have an e-mail field where all users will be entering the same domain after the "@". Is there a way to automatically replace the "@" with "@domain.com"? I have used the code below (and other variations of it, using quotation marks, etc.) and haven't been able to make it work:if (xfa.event.newText.match(/[@]/)) { xfa.event.change = "@domain.com";}Great appreciate any help!
2125
Views
0
Likes
0
Answers
Re: Mandatory check box before form submission Geckoz100 - Adobe LiveCycle
I know this thread is old, but just for future visitors.....If you want to require one of two checkboxes be marked before submitting, you can simplify the above with code like this in the "dummy" button. The "dummy" button should be visible, "Regular" control type, and contains the script. The "real" button is hidden, "Submit" control type, and has no script.if ((checkBox1.rawValue == "1") || (checkBox2.rawValue == "1" )) { SubmitButton_Real.execEvent ("click"); // the "real" button is the hidde...
5196
Views
0
Likes
0
Replies
Remove a subform permanently using javascript Geckoz100 - Adobe LiveCycle
I have a travel approval form that has two sections -- Domestic and Foreign. Both sections have many required fields. I set up a radio button at the top to select one of those options, so if the user selects Domestic, I want the Foreign section to disappear completely. The problem I'm having is that it doesn't disappear -- it's no longer visible but it seems to reside somewhere in memory. Then, when I use a Submit button to send the completed form, I get an error message saying there are require...
4541
Views
0
Likes
5
Answers and Comments
Remove a subform permanently Geckoz100 - Adobe LiveCycle
I have a travel approval form that has two sections, Domestic and Foreign. I set up the Domestic portion in one subform, the Foreign in another. At the top I have a radio for Domestic/Foreign, so the user clicks one and the unused section is supposed to disappear. The reason I want it to disappear and not just be hidden is because both sections contain required fields, so if I just hide the unused one, It still says there are incomplete fields when submitting. I have tried using the setInstances...
1690
Views
0
Likes
1
Answers and Comments
Re: Ampersand (&) in a field value is disrupting my e-mail script Geckoz100 - Adobe LiveCycle
Hey genel89623801, that did the trick! I had definitely not gotten past the issue and had resigned myself to replacing the ampersand with "and".Using the encodeURIComponent function wouldn't work for me within the body of the e-mail script, though I tried using value, rawValue and full XFA path notation with it. But it did work when I replaced the ampersand in a variable first, outside of the e-mail script, as below. I consider resolving this minor annoyance a great success. Thanks for the help....
1457
Views
1
Like
0
Answers
Re: Script to remove all rows in a table except the first Geckoz100 - Adobe LiveCycle
That worked like a charm! That's what happens when you learn to script through the school of hard knocks, just fumbling your way through it -- I just had to teach myself javascript, so I never discovered this function before. Really appreciate the help.
1666
Views
0
Likes
0
Answers
Script to remove all rows in a table except the first Geckoz100 - Adobe LiveCycle
Please see the screenshots for the question/radio button I'm scripting. If "No" is clicked I would like it to delete all rows except the first one. So if the user first clicks Yes, adds a bunch of rows and then clicks No, I want all the extra rows to be deleted. I'm using the script below but it only deletes half of the rows at a time. I have to click No 2-3 times to delete all the rows. Greatly appreciate any help!// remove extra rows that may have been addedvar rowCount = Page2.UserList.Table1...
2110
Views
0
Likes
2
Answers and Comments
Re: Ampersand (&) in a field value is disrupting my e-mail script Geckoz100 - Adobe LiveCycle
Yes, I eventually had to do that. Before the e-mail is generated I just take the value of the department and convert any ampersands to the word "and". They bosses want to keep the "&" in the names in the drop-downs since that's how they're officially written. Thanks again for the replies.
1452
Views
0
Likes
0
Answers
Re: Initial View Geckoz100 - Adobe LiveCycle
Radzmar, that sample you provided is amazing, thanks! Your tips and tricks are often found nowhere else.
1640
Views
0
Likes
0
Answers
Re: Ampersand (&) in a field value is disrupting my e-mail script Geckoz100 - Adobe LiveCycle
Thanks for the responses. Sorry genel89623801, but I don't understand the suggestion. Where my script is having trouble is in the body of the e-mail where the "Department" field is (line 7). Some department names have an ampersand in them (e.g., Litigation & Enforcement), so the script just breaks right at that point.
1462
Views
0
Likes
0
Answers
Time field: Allowing users to enter HMM (no colon) and display H:MM Geckoz100 - Adobe LiveCycle
How do I format a field to allow users to enter HMM (no colon) and display H:MM? I have put time{H:MM}|time{HHMM} in the Data pattern (it won't accept |time{HMM}, but it doesn't do the trick. The field still requires four digits to format automatically with the colon.
1230
Views
0
Likes
0
Answers and Comments
Re: Troubleshooting User Error Message - Install Korean Language Package? Geckoz100 - Adobe LiveCycle
I made a form for others and they're getting this same message about Korean Language Support. I get no such message on my machine. I haven't made any language changes recently (or ever, for that matter). I checked every single object and they were all set to either US or Default/US. I have now set them all to US but they still get the same message. I searched through the XML for "locale="k", "ko_kr" and "ko_" and nothing turned up. Any ideas? Greatly appreciate any help.
989
Views
0
Likes
0
Answers
Re: Ampersand (&) in a field value is disrupting my e-mail script Geckoz100 - Adobe LiveCycle
Hello Bruce,Thanks for your reply. I tried using that escaped value and it didn't work. I'm using a the script below in a dummy button which "clicks" a hidden submit button. So the script picks up a value of the name of one of the departments, which can have an ampersand, like "Advisory Board & Councils". So when the script runs I don't get an error (even with the debugger), it just chops everything that comes after that point in the script. When I click the Submit button that has the script bel...
1449
Views
0
Likes
0
Answers
Re: Deleted subform keeps reappearing after PDF is save and reopened Geckoz100 - Adobe LiveCycle
The script in my original post is in a radio button, which I have in the change event. I ended up having to put the same thing into the Doc Ready event to make the removed subforms "stay" removed. I still hope someone can shed some light on this.
1554
Views
0
Likes
0
Answers
Deleted subform keeps reappearing after PDF is save and reopened Geckoz100 - Adobe LiveCycle
I'm using a script to delete subforms. It works while the PDF is open -- the subform disappears. But after saving and closing the document, then reopening it, the deleted subform reappears. I duplicated line 2 and I get an error on it because the subform is gone and can no longer be deleted, so I know it's working. What am I missing?form1.Subform.occur.min = "0";form1._Subform.removeInstance(form1.Subform.index);I have also tried this and it has the same result:form1.Subform.occur.min = "0";form...
1733
Views
0
Likes
1
Answers and Comments
Re: Trim only leading and trailing spaces from a field Geckoz100 - Adobe LiveCycle
It worked, thanks! I haven't used many custom functions before, so I didn't know had to use the objName.functionName format to call it. So I set it up like below, in the Exit event, because if I left it without the if statement and then typed something, exited the field, and came back to delete it, it would add "null" (in actual text) to the field. Please let me know if you see anything I need to fix.// remove leading and trailing spacesif (this.rawValue != null) { this.rawValue = objSpaceTrim.t...
1770
Views
0
Likes
0
Answers
Re: Trim only leading and trailing spaces from a field Geckoz100 - Adobe LiveCycle
OK, thanks for that explanation, very helpful. So, I have one more question, sorry. I'm not that experienced with javascript, so I don't know how to call the function. Do I have to create a new script object and put your script in there?
1928
Views
0
Likes
0
Answers
Re: DATE VALIDATION dd/mm/yyyy (date field with manual entry) Geckoz100 - Adobe LiveCycle
One other thing just occurred to me -- perhaps you have the script in a Date field. I used a text field, so that I could run my own script without interference from any automated functions in the Date Field object type. I don't know if that might make any difference with the type conversion issue.
6423
Views
0
Likes
0
Replies
Re: Why do I get a message saying "____ cannot be left blank" error message upon opening a form? Geckoz100 - Adobe LiveCycle
I decided to put my validation script in the mouseEnter event of the Submit button. If the form validates, the button turns green. It's not a real-time validation like it was with the script in the layout:ready event, but it's a close second. In any case, it does improve the performance and usability of the form, because I noticed that it was slowing down the keyboard a little with the original setup because it was constantly validating. Now there's no delay.
1267
Views
0
Likes
0
Answers