since ‎31-03-2006
‎10-12-2019
_SekharN_
Level 5
Re: How can I prevent the entry of a future date in my date field?
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
Hope the following JS code helps you..........var checkDate = isCurrOrPastDate(this.rawValue)if (checkDate == true) { //xfa.host.messageBox("This date is valid current or past date."); }else { xfa.host.messageBox("Date can not be a future date"); xfa.host.setFocus(this.somExpression); //set focus back to the data field.}function isCurrOrPastDate(dateStr) { var dto = dateStr; var iLen1 = String(dto).length; var DD = dto.substring(iLen1, iLen1 - 2); DD = DD.replace(/^\s*|\s*$/g,""); //xfa.host.mes...

Views

208

Likes

0

Replies

0
Re: If Statement
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
I would change your logic to the following FormCalc code.....if (Date() > date2num("Mar 27, 2009","MMM DD, YYYY")) then form1.#subform[0].Table2.Row1.NoReg * 25else form1.#subform[0].Table2.Row1.NoReg * 20endif

Views

611

Likes

0

Replies

0
Re: E-mail sumbit button based on drop down choice
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
JavaScript is picky and case sensitive. I suspect some silly mistakes. Those have to be resolved and are part of learning curve. If you want me take a look just shoot me an email at "meetsekharv AT yahoo.com" with your template attached.

Views

61

Likes

0

Replies

0
Re: E-mail sumbit button based on drop down choice
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
Instead of standard Email button I would choose a regular button and will have following JS code added in Click event.........var eadd = "";var subj = "Subject text";var ebody = "Email Body text goes here";if (dd.rawValue == "BA") { eadd = "BA@Company.com";}if (dd.rawValue == "KC") { eadd = "KC@Company.com";}if (dd.rawValue == "GH") { eadd = "GH@Company.com";}event.target.submitForm({cURL:"mailto:"+eadd+"?subject="+subj+"&body="+ebody,cSubmitAs:"XML",cCharset:"utf-8"});//Replace XML with PDF if ...

Views

61

Likes

0

Replies

0
Re: Auto clear default text
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
It is easy...........I would use the following code in "Enter" and "Exit" events....Let us say the default text in the text field is "Default Text"//Enter event JavaScriptvar curText = this.rawValue;var defText = "Default Text"if (curText == defText) { //when the current text is same as Default text clear the box this.rawValu = "";}//no need of else condition as rest of the logic will be automatically taken care.///////////////////////////////////////////////JS Code for Exit eventvar defText = "...

Views

41

Likes

0

Replies

0
Re: Adding a Text Field to inline text
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
Let me try to explain it one more time.........Here is how I will do it.1. Add a text area and type in "Thank You For Your Recent Donation of $"2. Right after $ I will do right click on mouse and select "Floating field" from the popup menu then it will look like "Thank You For Your Recent Donation of ${TextField}"3. I will highlight {TextField} and select related Text Box field in Hierarchy window rename it to "SomeValue" then the text in design looks like "Thank You For Your Recent Donation of ...

Views

129

Likes

0

Replies

0
Re: Adding a Text Field to inline text
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
You answered your question your self. Check for "floating field" under help. You can do it with out text box. When you all floating field it in a running text by default you see {TextField} to rename or to do some scripting you highlight it and then select the field in Hierarchy window.

Views

129

Likes

0

Replies

0
Re: Attach file to PDF-form
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
Here is a way I tried log time ago it works for me however I have some additional things I have do with every new attachment so I am just pasting what I thought is enough in your case. Let me know if you see any issues..... you may try this JS code in a button click and you need to enable user rights and then you will find those attachments in attachment section which is usually hidden.var selectFileName = "C:\test.jpg"var doc = event.target;doc.importDataObject(selectFileName); var MyPar1 = doc...

Views

123

Likes

0

Replies

0
Re: OR syntax not working
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
Hi Patricia, With your description I guess you need to use "And" operatior in place of "Or" operator........if ((form1.subPage3.subApply25.ckbQuest26dol.rawValue == 0) && (form1.subPage3.subApply25.ckbQuest26call.rawValue == 0)) { xfa.host.messageBox("At lease one is required.", "Warning", "1") exit; } Good Luck,Sekhar

Views

117

Likes

0

Replies

0
Re: Two functions on one submit button??
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
You could consider composing two emails one with PDF and other with XML attachment but again the drawback is user have to remember to click send button on two of the emails.event.target.submitForm({cURL:"mailto:person@company.com?&body=XML Attachment&subject=XML Attachment", cSubmitAs:"XML",cCharset:"utf-8"}); event.target.submitForm({cURL:"mailto:person@company.com?&body=PDF Attachment&subject=PDF Attachment", cSubmitAs:"PDF",cCharset:"utf-8"}); Other alternative could be just composing one ema...

Views

704

Likes

0

Replies

1
Re: Two functions on one submit button??
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
use this in a button click event.//capture present XML in a variablevar printXML = xfa.data.saveXML();//do the following if you want to print part of the XMLvar startAt = printXML.indexOf("var endAt = printXML.indexOf("printXML = ""+printXML.substring(startAt, endAt+11)//11 is length of the XML tag may have to adjust this based on//end results.var subj = "email with XML and PDF";//following composes email with PDF attachmentevent.target.submitForm({cURL:"mailto:person@company.com?&body=following...

Views

704

Likes

0

Replies

0
Re: Two functions on one submit button??
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
just an idea, will that work if you print XML to email Body text instead of attachment and attach PDF to the same email?Let me know if that is an option. Be aware that the user can read and modify XML in this case before he/she click on email send button.

Views

704

Likes

0

Replies

0
Re: Tagging Radio Buttons to paragraphs in Form
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
If you use check box life will be easy.....Here is what I would use if both the checkbox and the paragraphs are on the same level on the object hierarchy.for Yes Check Box: On click event: JS:if (this.rawValue == 1) { this.parent..rawValue = 0; this.parent..presence = "visible";}else { this.parent..presence = "hidden";}for No Check Box: On click event: JS:if (this.rawValue == 1) { this.parent..rawValue = 0; this.parent..presence = "visible";}else { this.parent..presence = "hidden";}

Views

49

Likes

0

Replies

0
Re: Adobe Scripting/Presence Property
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
Fist thing I would check will be did I save the template as Dynamic Form Template. Defualt would be Static, so check that first it might resolve.

Views

23

Likes

0

Replies

0
Re: Unable to move subform when using moveInstance
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
some times just xfa.form.recalculate(1); will do it for you...try them individually and together to see which one works best. Remember any time you use relayout() that should be the last exicuting line of code in that script.

Views

34

Likes

0

Replies

0
Re: Unable to move subform when using moveInstance
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
try adding xfa.layout.relayout(); at the end of the script and let us know the results.

Views

34

Likes

0

Replies

0
Re: Master page is shown in the document
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
No, not possible to hide Master page or objects on Master page. The min occurrence on Master page is at least 1, can not set to 0. For the very first Master page it has to appear at least one time. If it is subsequent Master page appearance is dynamic and do not need to show up at all.

Views

195

Likes

0

Replies

0
Re: Expanding Text Field - to a point
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
See if the following JS code helps in your case.....it is not exactly what you are asking but will not let the field expand though it allows multiple lines. So you have to set the initial(final) height.you should use this code in 'enter' event of the each field that you wish to restrict the height.var SOM = this.somExpression;event.target.getField(SOM).doNotScroll = true;Good Luck,

Views

47

Likes

0

Replies

0
Re: Disabling fields on initialization of form
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
all you need is....this.access = "protected".this is a JavaScript code try using in initialize event of the field that you want to disable.

Views

21

Likes

0

Replies

0
Re: Form number count
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
Here is what you may try....add a textField add set the default value to 100000 (or the number you want) and in 'preSave' event add the following JS codethis.rawValue = parseInt(this.rawValue) +1Good Luck,

Views

30

Likes

0

Replies

0
Re: Why is LiveCycle kept saying there are Missing Fonts?
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
If you have original template designed in LiveCcle open it in LC again and choose 'Save As' then make sure to select 'Include Fonts' before saving, however doing so may increase the size of the file depending on verity of fonts used at design time.

Views

520

Likes

0

Replies

0
Re: Can an XML file be converted into something I can merge?
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
Merge is not an option in this case as all LiveCycle outputs are in the form of XML though they look PDF and serve as PDF. If you have Adobe Acrobat then you may export in the format of XML. Again LiveCycle output is not same as other PDFs.

Views

219

Likes

0

Replies

0
Re: Read only access to the rows of dynamic table
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
did you try table1.access = "readOnly"or table1.access = "protected"

Views

30

Likes

0

Replies

0
Re: Designer 9.0 and Readyer Version 7.0
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
Any form template that filled using Adobe Reader needs Reader Rights Enabled. Look for 'Reader Extensions' product in Adobe LiveCycle family.

Views

29

Likes

0

Replies

0
Re: Force Reader to open always
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
here is JS codeif (xfa.host.appType == "Reader") { if (xfa.host.version < 7) xfa.host.messageBox("Currently the application version your are using is "+xfa.host.version+".\nAn application version of Adobe Reader 7.0 or higher is required this form to function properly.") }else { xfa.host.messageBox("Please open this doc in Reader");}

Views

48

Likes

0

Replies

0
Re: Help with Fillable PDF text Fields
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
Consider adding some thing to Master page instead of Design page. Any thing that get added to Master page will just show up for any regular page that use the same Master page as background.

Views

42

Likes

0

Replies

0
Re: check if the rawvalue contains "TW"
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
try the following in Change event of the Dropdownvar curSelection = xfa.event.change;if (Right(curSelection, 2) == "TW") { //use your code to hide and visibility}function Right(str, n){ if (n <= 0) return ""; else if (n > String(str).length) return str; else { var iLen = String(str).length; return String(str).substring(iLen, iLen - n); }}

Views

80

Likes

0

Replies

0
Re: Drag and Drop function in Live Cycle 8
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
NO. That feature is not supported yet.

Views

40

Likes

0

Replies

0
Re: How can I decreaes a file size?
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
In LC use File>>Save As then uncheck "Embed Fonts" that will reduce the file size dramatically.

Views

36

Likes

0

Replies

0
Re: Maximum Text Field Size
Avatar

_SekharN_

_SekharN_
- Adobe LiveCycle
I guess it can accept up to 2 Billion characters (virtually unlimited). That is about the Max but how would you fit them on a regular page?

Views

42

Likes

0

Replies

0