开发者

working with forms and ajax in drupal 6

is it possible to alter a form after an ajax call? what i want to do is this: i have a form with some textfields and a select box with 2 options. what i want to do is when a person chooses one option, i will unset some of the textfields(depends on which option the user choose). i do this with ajax because i need to load from my DB which input to disable. ofcouese i can开发者_C百科 hide it with jQuery(which i do). but i was wondering that if there a way for doing it in the ajax server function. 10x.


I would get a look to the Form API of drupal and how AHAH (Asynchronous HTML and HTTP) works here and here you'll find a small example how to implement it.

Anyway you can always give a look on modules that are using it like pools, filefield (CCK), etc.

cheers :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜