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

  • 0
  • 1
  • Question
  • Updated 2 weeks ago
  • In Progress
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?
Photo of Lien Gilhooley

Lien Gilhooley

  • 84 Points 75 badge 2x thumb

Posted 4 weeks ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,572 Points 20k badge 2x thumb
Post your code.
Photo of Lien Gilhooley

Lien Gilhooley

  • 84 Points 75 badge 2x thumb
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.

Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,572 Points 20k badge 2x thumb
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:


(Edited)