Boolean field/checkbox gives error

My user table has boolean ‘isActive’ field. In postgres the column is with value as t or f.
I am using modal for creating new record. This works fine if i remove ‘isActive’ from insert query but fail if this field is selected with 500 error.

This is payload for request -

  1. email:umeshxxxxxx@gmail.com
  2. password:1
  3. first_name:
  4. last_name:
  5. date_signup:
  6. isActive:t

I tried all values for checkbox like t, ‘t’, 1, 0
Am I forgetting any step for checkbox configuration. (The create form is generated by generator)

regards

Use BOOLEAN type in PostgreSQL instead of T/F.

It is boolean in postgresql. I made table in wappler datasource and it is default type generated.

This is checkbox configuration in form -

<input class="form-check-input" type="checkbox" value="t" id="inp_isActive" name="isActive">

Value of checkbox should be 1.

This also gives error.

Could you post a screenshot of the insert step and the error from XHR in dev tools:

Thanks @Sorry_Duh, enabling server side debugging get me the real issue. It was my bad, the issue was not with boolean but blank ‘signup-date’ field. Adding now() in SC solved this issue.

I don’t want to give value in date field but want to keep it blank, How can I do this?

Thanks and regards

2 Likes

{{null}} will save null value in date field.

All issues are solved now.

Thanks @Sorry_Duh and @Notum

2 Likes