terminal42 / contao-conditionalformfields

Display form fields conditionally in Contao Open Source CMS
MIT License
18 stars 12 forks source link

Feature/use compile form hook #10

Closed dmolineus closed 9 years ago

dmolineus commented 9 years ago

Instead of loading the form fields from the database, I would like to use the compileFormFields hook instead. Then it would be possible to take account of manually injected fields from the compileFormFields hook.

This requires that the custom fieldset hook would be the last in the chain. There's no garantee for that, but by using the initializeSystem hook to register, it will definitly come after all defined hooks in the config.php file of each module.

aschempp commented 9 years ago

@qzminski can you validate that please?

Toflar commented 9 years ago

Looks good to me, btw.

qzminski commented 9 years ago

Approved - as long as it was tested and it works. You may just want to update the docs and typecast params in the registerFieldsets() method.

dmolineus commented 9 years ago

Yes, it works very well. I added the param types documetnation.

Toflar commented 9 years ago

But why does this PR contain my commit a572b67?

dmolineus commented 9 years ago

I started the PR initially from the master branch. What's why it was included. Rebased now.

Toflar commented 9 years ago

I'll merge it then, okay @aschempp @qzminski ?

aschempp commented 9 years ago

Fine with me, I didn't even understand what it's about :D