Simple Boolean Edit not Saving

When editing a record and changing the value of a boolean, FA is sending the original value of the boolean when saving the record.

Specifically, I select “Edit” and select the new boolean (radio button control) value and hit “Save” and the the browser’s Network inspector (as well as the admin console API output) show the old boolean value inside the structure.

Any idea what’s going on? The field is defined like this:

isEnabled: {
      type: DataTypes.BOOLEAN,
      allowNull: false,
      defaultValue: false

and we are on version 7.0.0 of forest-express-sequelize. Thanks!

Hi @yeti182,

Thanks for reaching out and sharing your issue :raised_hands:

I just made the test on my side with a project using the version 7.0.0 of forest-express-sequelize, with a boolean defined the same way you did, and it worked well :thinking:

Can you tell me what’s your project name?
And could you please make a screen video of your issue?
It would help us understand where the problem is.


Thanks, @adriguy!

Yes, it is really strange. I messaged you with more details and a video link.

@yeti182 Thanks for your video!

I didn’t notice you were using the radio button control.
Can you try with the checkbox option in the widget edit settings of the isEnabled field?

I think what’s going on here is that when you’re giving options for the radio button (I guess you gave “true” and “false”), then they are string options and not boolean options. So the update is impossible as types don’t match.
I guess the checkbox option would be your best option here!

Thanks, @adriguy! That’s exactly it.

Is it not possible to have Radio Buttons as a control for Boolean fields? The design of the checkbox isn’t intuitively “clickable” to change it from value to value. When we train users on the FA platform we’ve created, they almost-universally believe the checkbox isn’t editable. The radio buttons, however, are quickly understood.

I suppose we could insert a route override and translate the attributes from strings to boolean values. Are there any other options?

One thing I had in mind is to use the dynamic type / simple values of the radio button edit settings.
And to set it to your isEnabled field.
This way, it should work (as long as you have both true and false into your isEnabled values… :thinking:)

1 Like

What a clever solution! Worked great. Thanks, @adriguy

1 Like