Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

jasotastic81
Community profile jasotastic81 Level 4
Job title here
Location here
12 BADGES
Level 4

Level 4

Learn more
Joined the community 12-03-2013 6:47:53 PM
Offline
Top badges earned by jasotastic81
Customize the badges you want to showcase on your profile
Re: javascript if statement
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
OK, here's working script.btnSaveAs::clickif (xfa.host.messageBox("Did you secure the document prior to saving it?", "WARNING",2,2) == 4) app.execMenuItem("SaveAs");

Views

262

Likes

0

Replies

0
Re: Check for required fields without clicking anything
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
So, in your version, you rely on the ready::layout event. That should work well since you're using the built-in validate function.In my version the condition is just checking that there is something in a text field called tfSomething. I didn't know if you had set validation rules in you form. You'd have to put in a line to check each field you want to verify to ensure the form is ready. For instance, if you have 20 fields, but only really want to check 2, then you use a check like this with two ...

Views

637

Likes

0

Replies

0
Re: Creating a Super Form
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Would you be okay with multiple pages in a single form?Page1 = first formPage2 = Second formetc.Set each page to start on a new Page in the pagination tab, and it will look like individual forms. Then some simple coding logic to create some print buttons that only print certain forms.

Views

158

Likes

0

Replies

0
Re: Help with Form Calc
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
t=t+1

Views

159

Like

1

Replies

0
Re: Help with Form Calc
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
FormCalc doesn't recognize the =+ operator. You'll have to write it out. FormCalc will treat it as t = "+1" and output that at the end.

Views

157

Like

1

Replies

0
Re: Help with Form Calc
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Since each row has different information, I'll presume they are also named differently. Something like taxCollectorCustomerSatisfaction.tfMid and telephoneSurvey.tfMid for the first two rows. Whatever you called them, just make sure you're using the row name and cell name in your script.var t=0if (taxCollectorCustomerSatifaction.tfMid > 36) then t=t+1 endifif (telephoneSurvey.tfMid > 36) then t=t+1 endif//more lines for the rest of the tablet

Views

159

Like

1

Replies

0
Re: javascript if statement
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Something like this, probably:if (xfa.host.messageBox("WARNING","Did you secure the document prior to saving it?",3,2) == 3) app.execMenuItem("SaveAs");

Views

214

Likes

0

Replies

0
Re: Check for required fields without clicking anything
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
I like this. A reason to use the calculate event on a button!I'll let you work out how you would want to check the required fields (since I don't know how you set them up), but here's an example where we check for a field being empty. Multiple if statements could be used for the other required fields.btnSubmit::calculatevar incomplete = false;if (tfSomething.isNull) incomplete = true;//Put more if statements here if you just want to do it this way.//Otherwise you need to loop through all of them...

Views

641

Like

1

Replies

0
Re: Set focus on phone number field when validations fails
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Yeah, I'll learn how to count one day...

Views

988

Likes

0

Replies

0
Re: Lock a specific Text Field
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
I'm sure you could modify this for your purposes, but here's my solution with a checkbox instead of a button.So, if that box is checked when the form is saved, the text field will not generate a random number when the form is opened again.

Views

251

Likes

0

Replies

0
Re: Set focus on phone number field when validations fails
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
in the exit event of your field:if (this.rawValue.length !=9) xfa.host.setFocus(this);

Views

632

Likes

0

Replies

0
Re: Is there a possibility, that subforms flow up again to avoid big wide gaps in a document?
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Do you have page breaks allowed in the subforms themselves?

Views

228

Likes

0

Replies

0
Re: Set text field to required if a checkbox is checked
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Making a field required (as shown in the script) is more intended for stopping user from submitting a form via HTTP or email if the fields marked required are empty. (Not filling in required forms doesn't stop the user from printing it out.) If you want to stop a user from leaving a field blank as they're filling out the form, I'd recommend two scripts: one in the exit event of the field they fill out and another one in the change event of the checkbox.cbRequired::changeif (this.rawValue) xfa.ho...

Views

3.0K

Likes

0

Replies

0
Re: Help with Form Calc
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Are your other fields part of a table? If not, you may have to call each of them individually. Something like:var t = 0if (field1 > 36) then t=t+1 endifif (field2 > 36) then t=t+1 endifif (field3 > 36) then t=t+1 endifif (field4 > 36) then t=t+1 endift

Views

156

Likes

0

Replies

0
Re: Substr Function
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
No, that's just where I put mine for that example.

Views

537

Likes

0

Replies

0
Re: Substr Function
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Here's the method working using JavaScript.Maybe the problem is with how the method works. The first parameter is the starting location of the substring, and the second is the number of characters to take. So, from your example, you start with character 2 and take 12 characters. If you only want to ignore the first character, try substr(1,12). That starts at the first character in the string. (Keep in mind that characters in the string are numbered starting from 0.)

Views

535

Likes

0

Replies

0
Re: Encode leading zeros in barcode
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
I was using the calculate event for that previous example, but the PDF417 BarCode doesn't allow that to be modified. So, I would suggest a button or other valid event.A quick test to verify it's working.p1.btnChangeBarCode::clickif (PDF417BarCode1.rawValue == "0000001234") PDF417BarCode1.rawValue = "9876543210";else PDF417BarCode1.rawValue = "0000001234";

Views

467

Likes

0

Replies

0
Re: Encode leading zeros in barcode
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Which barcode are you using? I was able to leave the leading zeroes in an EAN8 barcode just by supplying the rawvalue as a text string.this.rawValue = "00001234";

Views

399

Likes

0

Replies

0
Re: Substr Function
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
substr is a method in JavaScript. Should you use xfa.record.DataConnection.FileName.value.substr(2,12) ?

Views

565

Likes

0

Replies

0
Re: Could someone please tell me the difference between Designer ES2 and ES4?
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
I'm certain there are more than this, but for my usage: LC Designer ES2 came free with Adobe Acrobat X Pro, and ES4 allows you to make the forms in HTML so it will work on mobile devices.

Views

478

Likes

0

Replies

0
Re: Repeating Subform
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
It should be in the click event for your button. Remember, you'll need to change the object names in the script to match what you've got in your form. Also, that first line "btnAdd::click" was just to let you know what event it should be in.

Views

145

Likes

0

Replies

0
Re: Problems with Action Builder in LC Designer ES4
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
I have not been able to reproduce the issue you are having, but I might be able to help you with the other part of it.Here's a screenshot of a sample form with two actions created with Action Builder.And here is the XML for those actions.Notice that the Action Builder script ALWAYS starts with //+ GENERATED and it always ends with //- for every individual action. For instance, the first action removes an instance of the blue subform, and the second one removes an instance. If you have duplicate ...

Views

197

Likes

0

Replies

0
Re: cannot use presence = "hidden" in an IF statement
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
I wonder if you've got a race condition here. As the first few if statements are being processed, the objects in the conditions haven't been initialized, yet, so it doesn't know what to do with them thus making the condition false. And by the time it gets to the regular statement at the end, the subform HAS been initialized, so it can make it hidden. If statements are certainly processed in the initialize event; though, I have never tried to use one in the initialize for the form itself.I might ...

Views

348

Likes

0

Replies

0
Re: I'm trying to change font.size with JavaScript on initialize
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
When I did it, I had a default value set that comes in when the field is initialized, and it works. If your field gets its value from a different source, then it should not be present as it is initialized. I would look into changing the event that this happens with. Layout:ready might be a better place for this.

Views

384

Likes

0

Replies

0
Re: cannot use presence = "hidden" in an IF statement
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Since I can't see the form, I'm just guessing: The problem might be in your condition. Are those rows named rowCE1, rowCE2, etc.? Or are they actually all named rowCE, and they have an index behind them?If looking at that doesn't help, would you paste a screenshot of your hierarchy in a reply for us? That lets us see the names of fields and the path to them. Also, include the script window in your screen shot, if possible, so we can look at the event that is supposed to trigger the script.

Views

320

Likes

0

Replies

0
Re: I'm getting a Script failed error. I think this is because the Field name is on page 1 and the field with the calculation is on page 2.
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Page1.Cash should do it. If it doesn't, you could use CTRL+click to enter the name into your script.Select the field you're adding the script to.Scroll the Design view until you can see the object whose name you need. (Not be needed if object is already in view)Click inside the script window to place the cursor where you want the name of the other object.Hold down the CTRL key while left-clicking the object whose name you need.

Views

164

Likes

0

Replies

0
Re: Set text field to required if a checkbox is checked
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Yes.For example, suppose you have a checkbox named cbRequired, and a text field named tfSomething that you would make required if the box is checked.cbRequired::change (javascript)if(this.rawValue == 1) tfSomething.validate.nullTest= "error";else tfSomething.validate.nullTest = "disabled";

Views

3.0K

Likes

0

Replies

0
Re: How do I add 6 or 12 weeks to date selected in a date field
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
First thing I notice is that your XML says you're using javascript, but Date2Num is FormCalc.If you change to formcalc, you should be able to see your days from epoch value.That said, your code would look something like this if you were setting the date value in dfWkDate to the day 42 days after dfHoldDate when the date is selected.dfHoldDate::exit (formcalc)dfWkDate = Num2Date(Date2Num($.formattedValue)+42)

Views

166

Like

1

Replies

0
Re: Validation - user needs to complete at least one field of a table...
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
I suggest a Boolean called complete initialized to false, then loop through the fields in the right column (3 months) and if the field is not null, set the bool to true. Then check the bool and if it's true, you know at least one thing was filled in.var complete = false;//since you named all of the cells individually, we just have to look through each one.if (!FinanceImpact7.isNull) complete = true;if (!HealthSafetyImpact7.isNull) complete = true;//etc...if (!ReputationSatekholders7.isNull) comp...

Views

518

Likes

0

Replies

0
Re: Repeating Subform
Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
- Adobe LiveCycle
Presuming that your subform and text field are called sfInfo and tfInfo, respectively, here's my solution to this problem:btnAdd::clicksfInfo.instanceManager.addInstance();xfa.resolveNode("sfInfo["+ (sfInfo.instanceManager.count-1) +"].tfInfo").rawValue = xfa.resolveNode("sfInfo["+ (sfInfo.instanceManager.count-2) +"].tfInfo").rawValue;

Views

145

Likes

0

Replies

0