With the '#form' setting I managed to implement almost everything I need in the form.

Now I'm struggling to create some fieldsets. Can it be done inside hook_autoadmin_schema (how?) or it would need hook_form_autoadmin_edit_form_alter?

Comments

_rune’s picture

Hi on my phone so will keep it brief. As fieldsets changes the structure of the form I'm not sure how it should be done. Don't think that it is supported by Auto Admin.

rsevero’s picture

That's what I thought.

In cases like this (where a new field should be created in the form) I believe the solution will be to use hook_form_autoadmin_edit_form_alter.

Thanks for your prompt answers.

rsevero’s picture

Status: Active » Fixed
_rune’s picture

Status: Fixed » Closed (fixed)

Looked a bit at it. It does not seem to hard to create something like: http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#django.contrib.a.... Maybe I will give it a shot at some point.

Cheers
Rune

rsevero’s picture

It would be really nice as it would get easier to create fieldsets. But it would mean some work on Auto Admin just to implement fieldsets support.

On the other hand if you could devise a way to allow anything different from Auto Admin schema settings to just pass to the form it would be simplier as you would implement all Form API functionality in a single move without having to rewrite them in Auto Admin.