回答編集履歴

1

戻るボタンで戻った場合の処理を追記

2019/07/06 16:14

投稿

YukiYamashina
YukiYamashina

スコア1011

test CHANGED
@@ -50,8 +50,60 @@
50
50
 
51
51
  }, false)
52
52
 
53
+
54
+
55
+ // 戻るボタンで戻った場合に再度表示させる.
56
+
57
+ $('#backbtn').on('click', function () {
58
+
59
+ $('.wpcf7-form input[type=checkbox]').each(function () {
60
+
61
+ var parent = $(this).closest('.wpcf7-list-item')
62
+
63
+ parent.show()
64
+
65
+ $(this).show()
66
+
67
+ })
68
+
69
+
70
+
71
+ $('.wpcf7-form input[type=radio]').each(function () {
72
+
73
+ var parent = $(this).closest('.wpcf7-list-item')
74
+
75
+ parent.show()
76
+
77
+ $(this).show()
78
+
79
+ })
80
+
81
+
82
+
83
+ $('form').removeClass('custom-wpcf7c-confirmed')
84
+
85
+ })
86
+
53
87
  })(window.jQuery)
54
88
 
55
89
 
56
90
 
57
91
  ```
92
+
93
+
94
+
95
+ 追記
96
+
97
+ ---
98
+
99
+
100
+
101
+ > ただ、確認画面から戻るを押した際に元のチェックしていなかったボタンが消えてしまいました。
102
+
103
+ > なんとか、コードを探そうと調べたのですが、どうしてもうまくいかず、恐れ入りますがお分かりでしたら教えていただきたいです。
104
+
105
+
106
+
107
+ 同じファイルの184~215行目がそれに当たります。
108
+
109
+ 上記コードに必要なものを追記しました。