Expand my Community achievements bar.

Designer 7.0 form working with Reader 7.0.5 but not Reader 7.0.8

Avatar

Former Community Member
Hello everyone,



I was wondering if anyone has had a problem with a formed created using Designer 7.0 that was working with Reader 7.0.5 but no longer functions with Reader 7.0.8?



The form consists of a numeric textbox N1 and 2 checkboxes C1[0] and C1[1].



All code is done using FormCalc.



Here is the situation: if the number in the numeric box is blank or not greater then zero, then neither check box can be checked. Both check boxes can not be checked at the same time. If the value in the numeric box is greater then zero, the checkboxes may or may not be checked (again both can not be checked at the same time).



N1 has code the following code in its exit event:



if (($.isNull) or ($.rawValue le 0)) then

C1[0].rawValue = 0 //if not positive value, checkboxes must be blank

C1[1].rawValue = 0

endif



C1[0] has the following code in its click and exit event



if (C1[0].rawValue == 1) then

C1[1].rawValue = 0 //C1[0] and C1[1] can not both be checked

endif



if ((N1.isNull) or (N1.rawValue le 0)) then

$.rawValue = 0 //uncheck if N1 is not positive

endif



C1[1] has the following code in its click and exit event



if (C1[1].rawValue == 1) then

C1[0].rawValue = 0 //C1[0] and C1[1] can not both be checked

endif



if ((N1.isNull) or (N1.rawValue le 0)) then

C1[1].rawValue = 0 //uncheck if N1 is not positive

endif



The above code worked exactly as described when the form was used in Reader 7.0.5.



Under Reader 7.0.8 the following happens:



if N1 is blank or less then or equal to zero, both checkboxes can be checked at the same time (this should not happen at all) but neither can be unchecked



if N1 is positive the code (and checkboxes) function as described.



I am not sure if this is a Designer issue or a Professional/Reader issue, so I am posting this here as well as in the other 2 spots.



Any help is greatly appreciated,



Ben
3 Replies

Avatar

Former Community Member
I tried recreating your form based on your description and tried it in a few different versions. I see the same behavior in all, where the check boxes are always clickable, can always be unclicked, and can never have both checked regardless of numeric field value. I've attached my form in case I made a mistake in trying to recreate yours.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
Chris,



Thank you for the sample you provided. First, I must apologize for not mentioning that there was additional code in the Click event. I thought I had removed it from my form, but apparently I had not.



I have compare the sample you provided to my form. I noticed several differences between them. First was that you used Designer 7.1 to create your sample, whereas I used Designer 7.0. I do not believe that this will have an impact, although it is possible. Also, in your sample, then click and exit events both need to contain the same "check" code. Your sample has one IF statement in the click event and one IF statement in the exit event. To match my form code, the Click and Exit events together need to contain both IF statements. My form originally contained the code in the Change event also.



i.e. C1[0] has the following code in both its Click, Exit and Change events



if (C1[0].rawValue == 1) then

C1[1].rawValue = 0 //C1[0] and C1[1] can not both be checked

endif



if ((N1.isNull) or (N1.rawValue le 0)) then

$.rawValue = 0 //uncheck if N1 is not positive

endif



and similarly for C1[1].



Based off your sample, I did some more digging and found that the problem is caused by the Change event for the checkboxes. I have removed the code from the Change event and now the form works as desired.



So, if the Change event has NO code, and if the Click and Exit events for the checkboxes have both IF statements the overall behavior (as specified earlier) is identical (and what I am looking for) for both Reader 7.0.5 and 7.0.8.



Now, if I add the IF statements to the Change event (without removing them from Click and Exit), the behavior in Reader 7.0.5 does not change (works as specified). In Reader 7.0.8, the checkboxes can not be unchecked if N1 is blank.



So my questions now become:



1) What has actually changed between Reader 7.0.5 and 7.0.8 (i.e. more detailed description than the generic release notes)?

2) Which one actually exhibits the correct behavior?

3) If this is a change to the event model, is this documented anywhere?



Thanks again,



Ben

Avatar

Former Community Member
Ok, I changed my form to have all the script in the change, exit, and click event. It now works as you said it should. However, when I try it in different version os 7.x I say the exact same behavior in all. IE: it's working for me as you said you wanted it to. So, my unhelpful answers to your questions are:



1) I don't have any more details that what is in the release notes.

2) I don't know, I see the same behavior in all.

3) There's been no change to the event model that I know of.



Looking more closely at the code, I don't see why you would want to put it in all of change, click, and exit. There doesn't seem to be any need to have it anywhere but click. Maybe there's some rare circumstance I haven't thought of.... but I can't think of one :p



Chris

Adobe Enterprise Developer Support