I was wondering if it is possible to set default values for a
PropelChoiceMany widget in the new action. If you edit an object, you
see the current relations between two classes defaultly checked. But
now I want some object checked by default in the new action, for
example most-used relationships.
This is my schema.yml:
page:
id: { type: integer, required: true, primaryKey: true,
autoIncrement: true }
title: { type: varchar(255), required: true, index:
unique }
slug: { type: varchar(255), required: true, index:
unique }
description: { type: longvarchar }
banner: { type: varchar(255) }
header: { type: varchar(255) }
content: { type: longvarchar }
hidden: { type: boolean, required: true, default: 0 }
homepage: { type: boolean, required: true, default: 0 }
rank: { type: integer, required: true }
keyword:
id: { type: integer, required: true, primaryKey: true,
autoIncrement: true }
title: { type: varchar(255), required: true, index:
unique }
general: { type: boolean, required: true, default: 0 }
link_page_keyword:
page_id: { type: integer, foreignTable: page,
foreignReference: id, primaryKey: true, required: true, onDelete:
cascade }
keyword_id: { type: integer, foreignTable: keyword,
foreignReference: id, primaryKey: true, required: true, onDelete:
cascade }
Just to be clear, an example from this schema.yml: when creating a new
page, I want some keywords checked by default.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---