Expand my Community achievements bar.

Need Help w/FormCalulating Options

Avatar

Former Community Member
I created a form with 3 Boxes.



Box 1) Quantity

Box 2) Price

Box 3) Amount



When I fill in the Quantity Box and email it to be priced, the recipient can change the quantity.



How do I change this so they are only allowed to fill in appropriate boxes?
8 Replies

Avatar

Level 6
Put the following JavaScript on the initialize event of the Quantity field:



if (this.rawValue != null)

this.access = "protected";



It's not foolproof, but you won't get people accidentally changing the quantity.



Jared Langdon

http://www.jlangdon.ca

Avatar

Former Community Member
Thanks Jared for the Script.



I tried it. It works generally.



But when I email it to my vendor (all he has is adobe reader) he get an kind of error message saying "Quantity Validate Failed".



I have him click OK, then the document opens and is good.



What I'm wondering, is how do I keep this message from popping up on the receiving end? I'm afraid if someone see's that message they might think

the file was corrupted and not open it?



Again, thinks for your help.

Avatar

Level 6
Is there a validation script on the quantity field? Does this problem happen when only when you use my script or is it unrelated?



I have seen a problem where version 7 pops validation messages upon opening the form, but version 8 doesn't. In my case, it was happening with numeric fields where version 7 was automatically putting in zeroes, which were not valid values. The fix was to remove the data pattern (on the binding tab). Maybe the problem you're having is similar.

Avatar

Former Community Member
I'm using LiveCycle Design from within Pro Version 8.



I don't know if I'm understanding you questions correctly or not but, when I click on the Qty box while in Design View, my tool bar (right above the form) has "Validate*" showing (I don't know why it would have an * out from validate). This is the only way I could apply your script. Language reads "JavaScript" and Run At reads "Client".



This problem only occurred when I applied your script and the error message is related.



I reviewed the Field/Value/Binding tabs. Field Tab looks ok, the Type is Numeric Field, as it should be. The Display Pattern looks correct (zzz9)



Under the Value Tab, the Display Pattern has empty, I selected zzz9 as the pattern. Also, I noticed a check mark in a box reading "Validation Script Message". I unchecked this.



Under the Binding Tab, the Data Pattern was already blank. I went ahead and put in the same Date Pattern as shown in the Value/Field Tabs.



I'm still receiving the same error message.



When I open my form, I put in a value like 5. When I Tab/Click into another filed the Error Message Pops Up.



There was one other thing I did notice however. When I put in a value in the Qty box and I Tab/Click out of it, it will not let me back in the change the value. I have to close the form and reopen it in order to change the value. I'll have to fix this as well.



Would it help if I where to emailed you my doc in you take a look at?

Avatar

Former Community Member
I'm using LiveCycle Design from within Pro Version 8.



I don't know if I'm understanding you questions correctly or not but, when I click on the Qty box while in Design View, my tool bar (right above the form) has "Validate*" showing (I don't know why it would have an * out from validate). This is the only way I could apply your script. Language reads "JavaScript" and Run At reads "Client".



This problem only occurred when I applied your script and the error message is related.



I reviewed the Field/Value/Binding tabs. Field Tab looks ok, the Type is Numeric Field, as it should be. The Display Pattern looks correct (zzz9)



Under the Value Tab, the Display Pattern has empty, I selected zzz9 as the pattern. Also, I noticed a check mark in a box reading "Validation Script Message". I unchecked this.



Under the Binding Tab, the Data Pattern was already blank. I went ahead and put in the same Date Pattern as shown in the Value/Field Tabs.



I'm still receiving the same error message.



When I open my form, I put in a value like 5. When I Tab/Click into another filed the Error Message Pops Up.



There was one other thing I did notice however. When I put in a value in the Qty box and I Tab/Click out of it, it will not let me back in the change the value. I have to close the form and reopen it in order to change the value. I'll have to fix this as well.



Would it help if I where to emailed you my doc in you take a look at?

Avatar

Level 10
It sounds like you have the script in the wrong spot - according to Jared's post the script should go in the "initialize" event and you have it in the "validate" event.

Avatar

Former Community Member
Thank you very much for that clarification. That cleared up my problem. I simple must have miss read what Jared was telling me. I'm very glad you came along with your suggestion.