Custom join form doesnt work...!

xryskom

Member
Custom join form doesnt work properly for the check boxes , the check boxes do not instert any information to the database. why?
can someone to explain me...? thanks
 

Basti

Administrator
Staff member
We had no issues so far with it.
Please let me know the setup from that field so i can try to duplicate
 

xryskom

Member
we tried adding text field options but that didnt give any result , same , it doesnt load anything to the database from fields

Add New Field >
field ID: sample_checkbox
Label Text: Sample checkbox
Field Type: Checkboxes

nothing else edited
 

Basti

Administrator
Staff member
Ehm did you actually set a value for the checkboxes?
If you made nothing but the above, the checkbox has a blank value, hence submits "empty" to the database.

Check if entered something into the choice field options. Text box options are only for textbox or textarea
 

Basti

Administrator
Staff member
Well it works just fine over here, please pm me admin url/password so i can try it out on your site.
If its some odd bug i can fix it directly on your site.
 

xryskom

Member
can you write step by step how do to correctly these checkboxes to make them put info into the database?
 

Basti

Administrator
Staff member
That is not needed, you did it right. Just that you not set any values for the checkboxes (( see my reply above ). Thats how it is done and usually working.
 

xryskom

Member
is it possible to make checkboxes work like , if the checkbox is NOT checked than the value set to be 0?
 

Basti

Administrator
Staff member
Ye that is not supported, if you need it like that, you can make the following, the checkbox internal value can be 1, display value nothing.

Then, as not checked boxes by default send nothing at all,
1) go to phpmyadmin
2) locate your database, go to VL_sites tables
3) on that table click "structure" at the top
4) lets say you named your field "my_new_field"
4.1) locate column "acf_my_new_field" and "acf_my_new_field_display"
4.2) edit the first one and give it a default value of "0"
4.3) edit the second one and either keep it blank or give it a default value of "Not set" or so

This way you could simulate your desired effect.
If they check the field, it would "1" in the database and if not it would be "0" since that is the columns default value

That should work, but i havent tested it, so you are my labor rabbit :)
 
Last edited:
Top