Hi, i did this last week and was also a bit lost at first. I can tell you what i did, and you adapt to your solution.
In my solution i had a module called Notifications, with the following fields: id, content, state, sent_at, instance, created_at.
In my problem notifications could be sent to a list of users, so the users are foreing data, not saved in the notification table (1 to n relation). So when you Edit o create a notification i only show a few fields of the notification (like it content, and the instance) the other fields like the date are not editable (my choice).
So in the creation i show only 2 of the 6 fields of the class. And also i want to see a list of users to multi-select, so i use a partial located in the template folder called "_get_all_users_list.php" that has a criteria and returns a multi-select tag.
_get_all_users_list.php file
<?php
echo select_tag('users', objects_for_select( UserPeer::doSelect(new Criteria),"getId","getUsername")
,array( "multiple"=>1, "size"=>15) );
?>
And to be able to show the list of users in the generator.yml i do this:
generator:
class: sfPropelAdminGenerator
param:
model_class: Notification
theme: default
list:
title: Notificaciones
max_per_page: 20
display: [ id, content, state, sent_at, sknow_instance, created_at]
object_actions:
_edit: ~
_delete: ~
batch_actions:
_delete: ~
edit:
title: Modificar notificacion:
display: [content, sknow_instance, _getAllUsersList ]
fields:
content: { name: Notification content, type: textarea_tag, params: size=80x5 }
get_all_users_list: { name: Select one or more users to be notified}
as you see in the "display:" area of the generator.yml on edit, you can declare the fields you want to be editable/enabled on creation, and if you want to include a partial, you must declare it with a _ in the begining and in the camelCase format, and the name of the partial must start with a _ and the name must be separated by _ .
I found very useful this chapter of symfony's book Admin Generator
i hope it help, and sorry for my english.