Selecting a radio button requires a text box entry
I have created an inspection form for my technicians to be able to complete across multiple different device platforms (Laptop, iPhone, iPad & Android). The form itself is pretty basic with some required information for the customer name, equipment information and the inspection items (depending on the equipment they are working on, there are between 10 and 75 items that need to be inspected). Where I'm having difficulty is the actual inspection sheet. The areas they need to check basically have 2 radio buttons for "Pass" and "Fail" and a "Comments" text box. I have the form setup with a java script that if they select the "Fail" radio box, they are required to enter text into the "Comments" box. If they select the "Pass" box, they can enter comments if they choose to do so. Everything works perfect when completing the form on a Laptop; however the script does not work on "smart devices" (iPhone, iPad or Android) and the "Fail" boxes are not required to have an entry before clicking the "Submit" button which creates a blank email with the form attached.
This is the script I'm currently running for one inspection:
this.getField("1. Bucket Area Comments").required = false;
this.getField("1. Bucket Area Comments").required = true;
this.getField("2. Upper Boom Comments").required = false;
this.getField("2. Upper Boom Comments").required = true;
etc....
After realizing I could make it a little simpler, I just used generic text box names on the other inspection sheets:
this.getField("Comments_1").required = false;
this.getField("Comments_1").required = true;
this.getField("Comments_2").required = false;
this.getField("Comments_2").required = true;
etc.....
Is there an alternative option to using the radio buttons (for example maybe the checkmark box) when selecting a specific checkmark box (in this example, the "Fail" box), it will require a text box entry? My company is trying to move more into a paperless society and to make the technicians job slightly easier to complete on their devices (also chicken scratch writing from some of the technicians is very difficult to decipher in general and then they scan it to the office for entering makes even more difficult to read).
Any help is greatly appreciated!
Jeramie
