1. cgeorge
  2. Support
  3. Tuesday, October 26 2021, 12:15 PM
Dear JSN Project team,

I try to integrate a new checkbox that should already be checked ad default (and should also be checked by default for the existing users). Unfortunately it doesn`t work with following values:

Field type: checkbox
standard value: 0
options: 0|25.06.2022 FRANKFURT

Am I doing something wrong?
Best regards and thanks in advance, Christopher
Accepted Answer
admin Accepted Answer
Admin
Hi,
please try with this query to fill field of existing users:
UPDATE #__jsn_users SET anmeldung_erfolgreich_fuer=' ["1"]' WHERE anmeldung_erfolgreich_fuer <> '' OR anmeldung_erfolgreich_fuer IS NULL
  1. more than a month ago
  2. Support
  3. # Permalink
admin Accepted Answer
Admin
Hi,
try to use another value instead "0", for checkboxes the 0 value can be intended as empty.
  1. more than a month ago
  2. Support
  3. # 1
cgeorge Accepted Answer
I tried, but unfortunately it doesn`t work - it`s still unchecked -
Field type: checkbox
standard value: 1
options:1|25.06.2022 FRANKFURT
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
Can you please post me your registration link to check this?
  1. more than a month ago
  2. Support
  3. # 3
cgeorge Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 4
cgeorge Accepted Answer
here we go...
  1. more than a month ago
  2. Support
  3. # 5
admin Accepted Answer
Admin
Hi,
Hi, the checkbox is only shown in user profiles, not in the registration process. I could give you admin access to the site if you want.
The default value only for registration process. If you want to fill the field for all existing users then you may think to fill user via SQL query like this
UPDATE #__jsn_users SET anmeldung_erfolgreich_fuer=' ["1"]' WHERE anmeldung_erfolgreich_fuer <> ''


NOTE: the checkbox allow you multiple values, so the stored value is in JSON mode; ["1"] mean value 1, for multiple value you can use a value like ["1","2","3"]
  1. more than a month ago
  2. Support
  3. # 6
cgeorge Accepted Answer
Thank you!
  1. more than a month ago
  2. Support
  3. # 7
cgeorge Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 8
cgeorge Accepted Answer
hereby the screenshots
  1. more than a month ago
  2. Support
  3. # 9
cgeorge Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 10
cgeorge Accepted Answer
That worked! Thank you very much!!
  1. more than a month ago
  2. Support
  3. # 11
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.