[Fixed]-Select a valid choice. '"xxx" is not one of the available choices

1๐Ÿ‘

โœ…

I may be misunderstanding the question a bit here, so if im way off base let me know and iโ€™ll delete my answer haha.

why not do an if or switch block statement switched based on the selections to set the required attribute

ie.

`$('#selector').on('change', function() {
       if ($(this).val() == "A"))  {
             $('#inputA').prop('required', true);
             $('#inputB').removeAttr('required');
        }
        if ($(this).val() == "B"))  {
             $('#inputB').prop('required', true);
             $('#inputA').removeAttr('required');
        }
  });

Thats what i have used on some of my pages in this scenario.

๐Ÿ‘คCraig B

Leave a comment