I solved my earlier problem with trying to get checkboxes to populate a text field. The code below worked well, but I have one question:
I noticed that when I uncheck the checkbox, I get "NA" in the text box. I need for the text boxes to be blank when the checkboxes are unchecked, so I removed NA from between the quotation marks in the code, and then the NA letters were no longer visible when the boxes were unchecked. It works, but is it "bad" code? Is there a cleaner way to have the text boxes be blank when the check boxes are unchecked?
event.value = this.getField('Check Box1').value;
if (event.value =='Off') event.value = 'NA'; // adjust for 'Off' or unchecked value
becomes
event.value = this.getField('Check Box1').value;
if (event.value =='Off') event.value = ''; // adjust for 'Off' or unchecked value
Thanks,
Amy
I think I remember seeing the rest of your code from yesterday and it had to do with assigning a value for the text field based on the value of the checkboxes, right (translating some number to a string)? If that is the case, how is it that event.value here seems to be a reference to a text field event? Wouldn't this code be in the checkboxes?
Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools
Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com