質問編集履歴

4

修正

2019/05/10 02:42

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -16,7 +16,9 @@
16
16
 
17
17
  ```
18
18
 
19
- <div id="contact-form">
19
+ <form action="" method="POST" id="contact_form" data-validate >
20
+
21
+ <div>
20
22
 
21
23
  <table >
22
24
 
@@ -94,11 +96,13 @@
94
96
 
95
97
  </div>
96
98
 
99
+ </form>
100
+
97
101
  <script>
98
102
 
99
103
  jQuery(function($){
100
104
 
101
- $("#contact-form").validate({
105
+ $("#contact_form").validate({
102
106
 
103
107
  rules : {
104
108
 

3

修正

2019/05/10 02:42

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -21,6 +21,36 @@
21
21
  <table >
22
22
 
23
23
  <tbody>
24
+
25
+ <tr class="radio">
26
+
27
+ <th><i>必須</i>radioチェック</th>
28
+
29
+
30
+
31
+ <td>
32
+
33
+ <span><label><input type="radio" id="00N0K00000xxxx" name="00N0K00000xxxx" class="inquiry">
34
+
35
+ <span>radio-1</span></label></span>
36
+
37
+
38
+
39
+ <span><label><input type="radio" id="00N0K00000xxxx" name="00N0K00000xxxx" class="inquiry">
40
+
41
+ <span>radio-2</span></label></span>
42
+
43
+ <span><label><input type="radio" id="00N0K00000xxxx" name="00N0K00000xxxx" class="inquiry">
44
+
45
+ <span>radio-3</span></label></span>
46
+
47
+
48
+
49
+ <div id="radioinfo_error"></div>
50
+
51
+ </td>
52
+
53
+ </tr>
24
54
 
25
55
  <tr class="checkbox">
26
56
 
@@ -78,29 +108,53 @@
78
108
 
79
109
  required: true
80
110
 
81
- }
111
+ },
112
+
113
+ "00N0K00000xxxx": {
114
+
115
+ required: true
116
+
117
+ },
118
+
119
+
82
120
 
83
121
  },
84
122
 
85
123
  messages: {
86
124
 
125
+ "00N0K00000xxxx" :{
126
+
127
+ required: "必須項目です。"
128
+
129
+ },
130
+
87
131
  "00xxxxxhhhh" :{
88
132
 
89
133
  required: "必須項目です。"
90
134
 
91
- }
135
+ },
92
136
 
93
137
  },
94
138
 
95
139
  errorPlacement: function(error, element) {
96
140
 
141
+ if(element.attr("name")=="00N0K00000xxxx")
142
+
143
+ {
144
+
145
+ error.insertAfter("#radioinfo_error");
146
+
147
+ }
148
+
97
- if(element.attr("name")=="00xxxxxhhhh")
149
+ else if(element.attr("name")=="00xxxxxhhhh")
98
150
 
99
151
  {
100
152
 
101
153
  error.insertAfter("#checkboxservice_error");
102
154
 
103
155
  }
156
+
157
+
104
158
 
105
159
  else{
106
160
 

2

修正

2019/05/10 02:27

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -68,7 +68,7 @@
68
68
 
69
69
  jQuery(function($){
70
70
 
71
- $("#contact_form").validate({
71
+ $("#contact-form").validate({
72
72
 
73
73
  rules : {
74
74
 

1

修正

2019/05/10 02:19

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -15,6 +15,12 @@
15
15
  下記はjqueryのソースコードです.補足:00xxxxxhhhhは他のシステムと連携するための使用しています。
16
16
 
17
17
  ```
18
+
19
+ <div id="contact-form">
20
+
21
+ <table >
22
+
23
+ <tbody>
18
24
 
19
25
  <tr class="checkbox">
20
26
 
@@ -51,6 +57,12 @@
51
57
  </td>
52
58
 
53
59
  </tr>
60
+
61
+ </tbody>
62
+
63
+ </table >
64
+
65
+ </div>
54
66
 
55
67
  <script>
56
68