since ‎02-07-2015
‎10-12-2019
mattiaswallin
Level 2
Re: Shrink-to-fit text default font size mattiaswallin - Adobe LiveCycle
Yes, using multi line makes the starting font size of an auto fitted text field a bit smaller. And in a sense that is a method to set the default starting font to something other than the regular (even though it does not give you control).So as you actually wrote initially as a reply to that answer, it's not a conclusive answer (nor solution) but at least it's sort of a pain relief. It is better than basic function, but not perfect.Great if it works for you!
1627
Views
0
Likes
0
Answers
Re: form global variable cannot update between session mattiaswallin - Adobe LiveCycle
Oh right, that would be a problem then as you set the value of that field in the postSave event. The value of the field will be changed, but it will disappear until the next time you open as you don't save the form after that change have had happened. In that way you could probably only use a "field flag" on the preSave event, so that the changes will be preserved.And in the case you put the flag change on preSave you can't be entirely sure that the save process won't be cancelled... And then we...
734
Views
0
Likes
0
Answers
Re: form global variable cannot update between session mattiaswallin - Adobe LiveCycle
I honestly have no clue how LiveCycle deals with global variables on opening/closing of forms.I know one way of achieving the functionality you're looking for anyhow is having an invisible "flag" field. Meaning simply using a numeric field and have its presence as hidden. Then you can toggle its .rawValue between 0 and 1 and use that as a true/false flag for if your form have been saved.However I'm not sure if this is the answer you are looking for. But it's something
742
Views
0
Likes
0
Answers
Re: Can I change ordering of pages in script? mattiaswallin - Adobe LiveCycle
Right, this is what I feared. And I think I get what you mean with the dynamic flow.I was hoping for a simpler approach though. Thanks for your time
858
Views
0
Likes
0
Answers
Re: Shrink-to-fit text default font size mattiaswallin - Adobe LiveCycle
I've been looking for a good answer for this aswell.And as Radzmar answered, from what I have found it seem that the answer to your question is "No, any such method does not exist".Personally I tried to work around it by having a check on the change event and if the text field overflows I would lower the font etc. However, the font size of the field doesn't update "immediately"/dynamically when changing the font for the field but rather it updated when the field was exited (even though some effo...
1631
Views
1
Like
0
Answers
Re: Can I change ordering of pages in script? mattiaswallin - Adobe LiveCycle
Not entirely sure that I follow the blog post perfectly. But to me it sounds like you simply have two versions of your form at the highest hierachy level and simply switch between them? Which would be pretty much the same as the approach I was discussing in my original question?In that essence it isn't the answer I am looking for, but thanks for the additional approach.
816
Views
0
Likes
0
Answers
Can I change ordering of pages in script? mattiaswallin - Adobe LiveCycle
Hello, my question is quite straightforward, I wonder if the possibility to reorder pages in a form by script exists?Just as a short description, my form is sort of a work order/checklist but when finished I want to be able to reorder the forms pages to create a report.My first thought was that it would seem as a trivial thing and that there would be some kind of possibility to change the page number of each form page or something like that, but I havent found any information by googling unfortu...
2149
Views
0
Likes
4
Answers and Comments
Re: How can I reuse a script to set variables? mattiaswallin - Adobe LiveCycle
I must admit I haven't used functions that much in LiveCycle, the idea with the way I wrote it was just an example of general function syntax.The difference between the way I wrote the function and your way (which works excellently for you) is that in your case you can't "impact" your function. Your function at this moment is simply a set piece of instructions that will be called the same way each time (of course your variables might have changed but you can't change how you use them).Let me try...
1541
Views
0
Likes
0
Answers
Re: How can I reuse a script to set variables? mattiaswallin - Adobe LiveCycle
To create a function to be able to reuse code easily right click in your hierarchy window (for example on your "form1") and click "Insert Script Object".A new script object will be created, just rename it to something appropriate and then create a function inside of it asfunction myFunction(var1,var2,var3){' just an example 'page1.textfield1.rawValue = var1 + var2 + var3}(I didn't fully understand the meaning of the date and event and city and exactly what your function is supposed to do, but th...
1278
Views
0
Likes
0
Answers
Re: Text field - value color. New User. mattiaswallin - Adobe LiveCycle
(Even noticed that that purple bar was there already without enabling the other toolbars with "Esc"). But however, try unchecking "highlight existing fields" lol
599
Views
0
Likes
0
Answers
Re: Text field - value color. New User. mattiaswallin - Adobe LiveCycle
Try unchecking "highlight exisiting fields".In the viewer tab if you press "Esc" key, you will get up the toolbars as it would look in regular acrobat. Then in the purple header/bar in the top right you have a choice to highlight fields. That will highlight the fields using the same kind of coloring options/properties as you changed earlier so that choice "overwrites" your coloring of the fields if that makes sense. If my answer helps please mark it as correct, and feel free to ask anything else...
618
Views
0
Likes
0
Answers
Re: Disable fillable fields mattiaswallin - Adobe LiveCycle
I am not entirely sure what goes wrong for you. I just made a quick trial myself on a numerical field with one button locking it with .access = "readOnly" and then a second button that activated it once again with .access="open". And that worked perfectly.Do you have the console open? Does it produce an error when you press that second button? In the previewer (or acrobat for that sake) you can press ctrl+j to open the console for debugging purposes.As the syntax seems correct and my trials seem...
837
Views
0
Likes
0
Answers
Re: Convert an excel formula into javscript for livecycle mattiaswallin - Adobe LiveCycle
Okay then the code will be: if (DecimalField4.rawValue < 1){ DecimalField25.rawValue = DecimalField2.rawValue } else { DecimalField25.rawValue = DecimalField4.rawValue }And to make it more rigid use full paths to your fields, for example "form1.page1.DecimalField4.rawValue".And this code should be entered on the calculate event for the DecimalField25 I would say. (could probably be used on an exit event of DecimalField4 aswell, seeing it seems like you do a lookup on that value).Hope this has he...
598
Views
0
Likes
0
Answers
Re: How can I make a decimal field default to a negative dollar amount? mattiaswallin - Adobe LiveCycle
Yes I suspected you meant it like that but wasn't sure as you wrote "where to put the minus sign".Anyhow, being in Adobe LiveCycle Designer, there is a thing called the "Script Editor". If you don't have that showing you can find it by navigating from the top most toolbar -> "Window" and click -> "Script Editor". Alternatively press ctrl+shift+f5.What you want to do is to link your script to a certain the object (field) and then choose what event it will trigger on (I will try to explain a bit e...
680
Views
1
Like
0
Answers
Re: How can I make a decimal field default to a negative dollar amount? mattiaswallin - Adobe LiveCycle
That is dealt with in the second row of Magus code, if you want to understand it a little bit better I will try to write it in "regular" language:First he declares a variable named "amount" which is then assigned to take on the mathematical absolute value of what was entered in the field, meaning that no matter if the user enters +6.84, -6.84 or 6.84 what will be stored in the amount variable will always be 6.84 (the magnitude of what was entered). Then in the second row he declares that the val...
706
Views
1
Like
0
Answers
Re: Convert an excel formula into javscript for livecycle mattiaswallin - Adobe LiveCycle
Okay, I am not perfectly skilled in excel, but from what I know of their if statements, that code would be written as =IF(DecimalField2 < 1, DecimalField4, DecimalField8). And that would mean "if decimalfield2 is less than one, enter decimalfield4 in the field in which this function is written, else enter decimalfield8."Therefore it is a bit hard to understand what you want to achieve... It would have helped if you would have simply wrote two sentences of about what you want to achieve. However,...
588
Views
0
Likes
0
Answers
Re: Multi-check mark checkbox using javascript mattiaswallin - Adobe LiveCycle
No problem, happy to help
2095
Views
0
Likes
0
Answers
Re: Multi-check mark checkbox using javascript mattiaswallin - Adobe LiveCycle
Yes, I have sent it, please let me know if it works for you
1604
Views
0
Likes
0
Answers
Re: Multi-check mark checkbox using javascript mattiaswallin - Adobe LiveCycle
Yes, I think it will be easiest if you give me your mail and I will mail the example I have worked on. If you would prefer not to post it, you could just send an PM or something to me with your mail address.
1616
Views
0
Likes
0
Answers
Re: Multi-check mark checkbox using javascript mattiaswallin - Adobe LiveCycle
And just to make sure you have everything set up the same way as I do.1. Do you have the script on the "change event" of the checkbox?2. Is the Check Box set up as a on/off check box with the "Check" check style? (field palette)3. Do you have the "On Value" as 1 and the "Off Value" as 0 ? (binding palette)
1609
Views
0
Likes
0
Answers
Re: Multi-check mark checkbox using javascript mattiaswallin - Adobe LiveCycle
Hmm okay, that's strange as it has the correct behaviour for me.. I have no clue as to why it would differ between the versions (I am sitting in Designer ES2). Do you have the possibility to upload your form and share the link here so I can have a look? Otherwise I can try make this code a bit more "rigid" aswell.
1610
Views
0
Likes
0
Answers
Re: Multi-check mark checkbox using javascript mattiaswallin - Adobe LiveCycle
If I understand your question, you want to cycle through the same checkbox and want the icon in the checkbox to change between check, cross and an empty box?If that is the case I managed to achieve that functionality with this code in the change event of the checkbox.if (this.ui.oneOfChild.mark === "check" && this.rawValue == 0){ this.ui.oneOfChild.mark = "cross"; this.rawValue = 1; } else if (this.ui.oneOfChild.mark === "cross"){ this.ui.oneOfChild.mark = "check"; this.rawValue = 0; }(the check...
1611
Views
1
Like
0
Answers
Re: Need to unlock all fields after submission for further edits mattiaswallin - Adobe LiveCycle
That's great!Have a good day you aswell
730
Views
0
Likes
0
Answers
Re: Need to unlock all fields after submission for further edits mattiaswallin - Adobe LiveCycle
Those lines of code simply refer to a separate script object that the person who created the form have created. If you look in your hierarchy tree, the you will find "myScriptObject" furthest down in the hierarchy (generally) under a category called Variables. This is simply a object that can be filled with functions governing your form.It will be in that script object that any code to do any kind of locking actually exists.For anyone to be able to see what has been done and why it doesn't work ...
735
Views
0
Likes
0
Answers
Re: How to suppress red highlighted Required Radio buttons? mattiaswallin - Adobe LiveCycle
Yeah , I think that would be the most straight forward way of doing it aswell. If you need any help feel free to ask.
933
Views
0
Likes
0
Answers
Re: How to suppress red highlighted Required Radio buttons? mattiaswallin - Adobe LiveCycle
Anyhow, if you want a working solution in which you have the "editable" fields in the light blue color without too much hassle, I would suggest two ways to go about it.1. Use the "Highlight existing fields" but do NOT use the standardized "required" property of the required fields, but instead do a simple verification on your own on the "preSave" event. The code would look like: (whenever user tries to save) Is 'requiredfields' empty? -> inform user that they need to enter the required fields. (...
904
Views
0
Likes
0
Answers
Re: How to suppress red highlighted Required Radio buttons? mattiaswallin - Adobe LiveCycle
Hehe, a funny part is that I have actually been starting to do some VBA scripts in Excel recently, and yes. As they both are scripting it is quite similar, however the languages are quite different.After doing some more research, I found an interesting thing in livecycle.Under "File" -> "Form properties" -> "Form Validation" there are these two pages called "Color Failed Fields" and "Color Mandatory Fields". And to me it seems what you want to achieve is in this "color mandatory fields" page, as...
917
Views
0
Likes
0
Answers
Re: Datepicker and future dates mattiaswallin - Adobe LiveCycle
I still have had a bit of problem even trying to reproduce this issue. Personally if I did exactly as you stated, made the display pattern date{MM/DD/YYYY} and then entered todays date and simply changed the last two letters it stayed as I entered it "2036" or "2047" after I tabbed out of the field.However, if I changed the patterns to only utilize the YY pattern, I can get the behavior as you write (entering 15 will give 2015 while entering 50 will result in 1950). But then I can't understand h...
1145
Views
0
Likes
0
Answers
Re: how do i limit a textfield to specific alpha characters of one entry but in a textfield that needs to have a limit of two spaces in order to allow for a two-letter combination? mattiaswallin - Adobe LiveCycle
Oh okay, I thought that was simply a consequence of you only allowing one alphabetic entry, never understood you wanted it as a feature to have the "n" autocomplete to "na".Did you miswrite this last comment? As above you have stated that "I had hoped to limit the 'na' entry to lower case". Is this simply for the entry? You want the output to always be uppercase?If this is the case you simply just have to remove the if statement on the exit event making this.rawValue.toUpperCase() trigger everyt...
998
Views
0
Likes
0
Answers
Re: How to suppress red highlighted Required Radio buttons? mattiaswallin - Adobe LiveCycle
My idea, to be able to keep the blue color was to turn off the "required" property of the radio buttons. And that the script (explained in regular language) will -> check if the required boxes are empty -> and if so notify the user that they must answer them.It's a bit tricky if you haven't scripted before so there are a few things to learn. My example was simply a generic example, to make it apply to your form you have to "refer" to your actual radiobutton list. If you check your hierarchy pale...
915
Views
0
Likes
0
Answers