Dependent form fields not inserted correctly.
I have a form that is divided into two parts.
Depending on what the user selects in the first select menu - different fields are then displayed (using a show-hide javascript).
There are two choices in the select menu (approved, not approved). If "not approved" is selected, the text field: "reason" is displayed. But if "approved" is selected, other fields are displayed instead. When the submit button is pressed, data should be inserted into three different tables. This works if you select "approved". But for some reason I do not understand, the submit button does not work if you select "not approved". I suspect it has something to do with the validation. But I think the javascript that handles show-hide is correct. Could there be some conflict between the validation scripts? Can you help me figure this out?
I have tried to create a rule that is used in the Insert records, maybe this is the problem?
<? php
if ((WA_Auth_RulePasses ("add bucket approved")) && (isset ($ _ POST ["bucketAddTips"]) || isset ($ _ POST ["bucketAddTips_x"]))) {...
But this does not help.