Remove value from exported values
I have created a PDF Form. I am pulling the values from the form to display in a text box using the following code:
event.value = this.getField("Company/DBA").value + this.getField("State").value + this.getField("name&lic").value + this.getField("Address").value + this.getField("Phone").value + this.getField("MAbroker").value + this.getField("NYbroker").value + this.getField("LicenseLookup").value + this.getField("RealEstateAd").value + this.getField("RatesTerms").value + this.getField("NotAllBorrowers").value + this.getField("MarketConditions").value + this.getField("BorrowerQual").value + this.getField("NotACommit").value + this.getField("MaxLoanAmount").value + this.getField("GovSponsProd").value + this.getField("ARM").value + this.getField("RefiAd").value + this.getField("TargetAd").value + this.getField("TaxDeductibility").value + this.getField("BrokeredProduct").value + this.getField("ReverseMortgage").value;
The issue I am having is that I have some of this form fields set as a drop down list where the user can select yes or no. If the user selects yes, then I have a sentence that is pulled as the export value. When the user selects No, the No defaults as the export value. When I end up with is a string of text that has a bunch of No's in it...
What I want to do is have the user select no and have the export value be nothing. I tried putting in a space as the Export Value, but then I end up with random spaces in the line of text.
I think an if/then statement is probably the best solution, but due to my limited experience with javascript, I am not having much success on getting this to work.
Additional Information: I tried doing the same thing with check or radio buttons and I was having a similar outcome.