Forum Discussion

LienGilhooley's avatar
LienGilhooley
Qrew Cadet
7 years ago

Cannot get a change event to fire for multiple-choice text field displayed as radio buttons

I have a multi-choice text field.  I've written a small snippet of code that performs some action based on what the user has chosen in that field (an "onchange" event).  The code works fine when the field is displayed as a multi-choice text field on the form.  Once it change it to "dispaly choices as radio buttons", the code no longer works.  The "onchange" event no longer fires.  I've tried the "click" event, but that does not fire either.

Has anyone else encountered this problem?
  • if (/a=nwr/i.test(querystring)) {
        $("#_fid_43").attr("readonly", "true");

        $("#_fid_27").on("change", function() {

    switch($(this).val()) {

         blah, blah, blah


    fid_27 is currently a multi-choice text field.  On the form, if I select the option to display this field as radio buttons, the OnChange event never fires.  I've also tried the OnClick event and that does not work either.

  • With the field displayed as options this code works:
    $("#_fid_6")
      .on("change", function() {
        console.log(this.value)
      });
    With the field displayed as radio buttons this code works:
    $("input[type=radio][name=radio_fid_6]")
      .on("change", function() {
        console.log(this.value);
      });
    I should note that the HTML QuickBase spits out for the radio buttons is malformed and produces this message in the console: