Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Problem using a form in a plugin


Null
Member

@null

Well got the bb_get_option working, but not my form. Did take a look at yours and several others, but I can’t seem to see the logic in them. I’ve made some changes but it aint updating at all anymore.

This is what i have now:

// Show form
function bbportal_form() {
?>
<h2><?php _e('Portal Management'); ?></h2>
<h3><?php _e('Portal settings'); ?></h3>
<form action="" method="post">
<table>
<tr><th scope="row"><label for="forum_id"><?php _e('Where do you want to pull the topics from?'); ?></th>
<td><?php forum_dropdown(); ?></label></td>
</tr>
<tr><th scope="row"><?php _e('Number of topics on the portal:'); ?></th>
<td><input type="text" name="number_of_topics" id="number_of_topics" /></td>
</tr>
</table>
<p class="submit alignleft"><input name="submit" type="submit" value="<?php _e('Submit'); ?>" /></p>
</form>
<?php
}

// Update portal
function update_bbportal() {
if (isset($_POST['submit'])) {
bb_update_option( 'pforum_id', $_POST['forum_id'] );
bb_update_option( 'number_of_topics', $_POST['number_of_topics'] );
}
}

So what do i miss?

Thx

Skip to toolbar