質問編集履歴
1
誤字
title
CHANGED
File without changes
|
body
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
[email* mail]
|
57
57
|
</p>
|
58
58
|
<p>ラジオアイテム<br />
|
59
|
-
[radio item "
|
59
|
+
[radio item "itemA" "itemB"]
|
60
60
|
</p>
|
61
61
|
</div>
|
62
62
|
<p>
|
@@ -82,7 +82,12 @@
|
|
82
82
|
$name =$formData['name'];
|
83
83
|
$mail =$formData['mail'];
|
84
84
|
$item =$formData['item']; //radio button
|
85
|
-
$wpdb->insert ( 'wp_cf7db', array('name' => $name,'mail' => $mail), array( '%s','%s'
|
85
|
+
$wpdb->insert ( 'wp_cf7db', array('name' => $name,'mail' => $mail), array( '%s','%s' ) );
|
86
|
+
|
87
|
+
//下記はダメでした。JSONエラーがでて、DBにインサートされません。
|
88
|
+
//JSON.parse: unexpected character at line 1 column 1 of the JSON data
|
89
|
+
//$wpdb->insert ( 'wp_cf7db', array('name' => $name,'mail' => $mail,'item' => $item), array( '%s','%s','%s' ) );
|
90
|
+
|
86
91
|
}
|
87
92
|
remove_all_filters ('wpcf7_before_send_mail');
|
88
93
|
add_action( 'wpcf7_before_send_mail', 'contactform7_before_send_mail' );
|