I have a many-to-many relationship which is represented by checkbox in the back-end forms. How could I set the form up to have all the checkbox checked when creating a new record?
OctoberCMS Builder Relation Checkboxes Default Value
323 views Asked by Wreigh At
1
hmm not sure we can do it in correct way because actually to make that check box selected we need actual relation in DB but at that moment we don't have that so, but we can make some hack for it
ok, so first if you created form using form builder,
you have controller and its view files
now go to its view files find
create.htm
now find this line<?php Block::endPut() ?>
and pastethis code after
. like thisthese peace of code will check all the box when page loads.
please comment if you find any difficulties.