17487 Posts in 4473 Topics by 1978 members
|Go to End|
4 May 2008 at 11:43am
is there anyway to automatically have the checkboxes default to checked when creating a new entry in a HasManyComplexTableField?
i'm currently filtering the results in the CMS with the $sourceFilter param, which works well, but unfortunately now if i create a new entry it doesn't even give me the option of checking it. so all new entries are hidden unless i manually edit the ID association in mysql.
15 June 2008 at 5:02pm
Looking for the exact same thing...
15 June 2008 at 5:09pm
Found the solution to this here:http://silverstripe.com/site-builders-forum/flat/45030
$tablefield->relationAutoSetting = true; after the Complex field declaration fixes the issue.
15 June 2008 at 5:55pm Last edited: 15 June 2008 5:56pm
Maybe what you need is ComplexTableField? It displays only items associated with your page, i.e. there are no checkboxes (there is a 'delete' button) and items are automatiacally added to relationship when created.
16 June 2008 at 1:45pm
Good tip Cinek. That worked well.
|Go to Top|