Drupal Studs help me with my form_alter hook ( I am almost there)

倖福魔咒の 提交于 2019-12-02 03:46:22

I suggest you have a look at content profile module before rolling your own solution.

You define your a custom content type (node) for your school registration, add in you cck fields, and activate it as a content profile. On content profile settings, you then activate it on user registration form. Zero code !

RedBen is right, content profile may be a better solution.

It seems like you're adding the second submit handler in a strange way - it's simply the name of a function, not an array. Have you checked that your submit handler is running?

Because the reference to the handler is a simple string, you just need to append it to the array using

$form['#submit'][] = '_module_registration_submit'

If you need it to run before the standard handler, use array_unshift to push it onto the beginning of the #submit array.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!