我创建了这个小部件函数来显示订阅表单,但在这里,当有人提交时,我无法获取输入字段的值。请帮助获取表单的post值。
function widget($args, $instance) {
extract( $args );
// these are the widget options
$title = apply_filters(\'widget_title\', $instance[\'title\']);
echo $before_widget;
echo \'<div>\';
// Check if title is set
if ( $title ) {
echo $before_title . $title . $after_title;
}
?>
<form>
<p><label for="db_sub_name">Name</label> <input type="text" name="db_sub_name" id="db_sub_name" value="" placeholder="Enter your Name"></p>
<p><label for="db_sub_name">Email</label> <input type="text" name="db_sub_email" id="db_sub_email" value="" placeholder="Enter your Email"></p>
<p ><input style="float:right;" type="submit" /></p>
</form>
<?php
echo \'</div>\';
echo $after_widget;
}
谢谢