Skip to:

Re: Problem using a form in a plugin

I think you are misunderstanding how PHP is used to process forms. You can’t call a PHP function using an “onclick” event.

PHP is a server side pre-processor, not a client side scripting language. The form needs to be posted, then you need to somehow trigger the php function on the recipient page. In bbPress, this is done by hooking into the API.

Read this…

Then I suggest you download and copy the methods used in another plugin that does this. No one will mind you copying their methods. You can feel free to adapt from any of my plugins that do this. “LDAP authentication” does it, so does “Restrict registration”. The code for handling admin pages is at the bottom of both plugins. These will also give you a clue as to how to implement the bb_*_option functions.

Skip to toolbar