質問編集履歴

4

参考サイトの追加

2021/02/07 02:35

投稿

taizoyama
taizoyama

スコア3

test CHANGED
File without changes
test CHANGED
@@ -344,6 +344,10 @@
344
344
 
345
345
 
346
346
 
347
+ [参考サイト](https://into-the-program.com/laravel-create-contact-form/)
348
+
349
+
350
+
347
351
  どなたかご回答いただけないでしょうか。
348
352
 
349
353
  何卒よろしくお願い致します。

3

確認用のviewの追加

2021/02/07 02:35

投稿

taizoyama
taizoyama

スコア3

test CHANGED
File without changes
test CHANGED
@@ -170,7 +170,7 @@
170
170
 
171
171
 
172
172
 
173
- ```view
173
+ ```indexview
174
174
 
175
175
  <form method="POST" action="{{ route('contact.confirm') }}">
176
176
 
@@ -258,6 +258,92 @@
258
258
 
259
259
 
260
260
 
261
+ ```comfirmview
262
+
263
+ <form method="POST" action="{{ route('contact.send') }}">
264
+
265
+ @csrf
266
+
267
+
268
+
269
+ <label>お名前</label>
270
+
271
+ {{ $inputs['name'] }}
272
+
273
+ <input
274
+
275
+ name="name"
276
+
277
+ value="{{ $inputs['name'] }}"
278
+
279
+ type="hidden">
280
+
281
+
282
+
283
+ <label>メールアドレス</label>
284
+
285
+ {{ $inputs['email'] }}
286
+
287
+ <input
288
+
289
+ name="email"
290
+
291
+ value="{{ $inputs['email'] }}"
292
+
293
+ type="hidden">
294
+
295
+
296
+
297
+ <label>タイトル</label>
298
+
299
+ {{ $inputs['title'] }}
300
+
301
+ <input
302
+
303
+ name="title"
304
+
305
+ value="{{ $inputs['title'] }}"
306
+
307
+ type="hidden">
308
+
309
+
310
+
311
+
312
+
313
+ <label>お問い合わせ内容</label>
314
+
315
+ {!! nl2br(e($inputs['body'])) !!}
316
+
317
+ <input
318
+
319
+ name="body"
320
+
321
+ value="{{ $inputs['body'] }}"
322
+
323
+ type="hidden">
324
+
325
+
326
+
327
+ <button type="submit" name="action" value="back">
328
+
329
+ 入力内容修正
330
+
331
+ </button>
332
+
333
+ <button type="submit" name="action" value="submit">
334
+
335
+ 送信する
336
+
337
+ </button>
338
+
339
+ </form>
340
+
341
+
342
+
343
+ ```
344
+
345
+
346
+
261
347
  どなたかご回答いただけないでしょうか。
262
348
 
263
349
  何卒よろしくお願い致します。

2

viewの変更

2021/02/07 02:30

投稿

taizoyama
taizoyama

スコア3

test CHANGED
File without changes
test CHANGED
@@ -172,69 +172,87 @@
172
172
 
173
173
  ```view
174
174
 
175
- <form method="POST" action="{{ route('contact.send') }}">
176
-
177
- @csrf
178
-
179
-
180
-
181
- <label>メールアドレス</label>
182
-
183
- {{ $inputs['email'] }}
184
-
185
- <input
186
-
187
- name="email"
188
-
189
- value="{{ $inputs['email'] }}"
190
-
191
- type="hidden">
192
-
193
-
194
-
195
- <label>タイトル</label>
196
-
197
- {{ $inputs['title'] }}
198
-
199
- <input
200
-
201
- name="title"
202
-
203
- value="{{ $inputs['title'] }}"
204
-
205
- type="hidden">
206
-
207
-
208
-
209
-
210
-
211
- <label>お問い合わせ内容</label>
212
-
213
- {!! nl2br(e($inputs['body'])) !!}
214
-
215
- <input
216
-
217
- name="body"
218
-
219
- value="{{ $inputs['body'] }}"
220
-
221
- type="hidden">
222
-
223
-
224
-
225
- <button type="submit" name="action" value="back">
226
-
227
- 入力内容修正
228
-
229
- </button>
230
-
231
- <button type="submit" name="action" value="submit">
232
-
233
- 送信する
234
-
235
- </button>
236
-
237
- </form>
175
+ <form method="POST" action="{{ route('contact.confirm') }}">
176
+
177
+ @csrf
178
+
179
+
180
+
181
+ <label>お名前</label>
182
+
183
+ <input
184
+
185
+ name="name"
186
+
187
+ value="{{ old('name') }}"
188
+
189
+ type="text">
190
+
191
+ @if ($errors->has('name'))
192
+
193
+ <p class="error-message">{{ $errors->first('name') }}</p>
194
+
195
+ @endif
196
+
197
+
198
+
199
+ <label>メールアドレス</label>
200
+
201
+ <input
202
+
203
+ name="email"
204
+
205
+ value="{{ old('email') }}"
206
+
207
+ type="text">
208
+
209
+ @if ($errors->has('email'))
210
+
211
+ <p class="error-message">{{ $errors->first('email') }}</p>
212
+
213
+ @endif
214
+
215
+
216
+
217
+ <label>タイトル</label>
218
+
219
+ <input
220
+
221
+ name="title"
222
+
223
+ value="{{ old('title') }}"
224
+
225
+ type="text">
226
+
227
+ @if ($errors->has('title'))
228
+
229
+ <p class="error-message">{{ $errors->first('title') }}</p>
230
+
231
+ @endif
232
+
233
+
234
+
235
+
236
+
237
+ <label>お問い合わせ内容</label>
238
+
239
+ <textarea name="body">{{ old('body') }}</textarea>
240
+
241
+ @if ($errors->has('body'))
242
+
243
+ <p class="error-message">{{ $errors->first('body') }}</p>
244
+
245
+ @endif
246
+
247
+
248
+
249
+ <button type="submit">
250
+
251
+ 入力内容確認
252
+
253
+ </button>
254
+
255
+ </form>
238
256
 
239
257
  ```
240
258
 

1

viewのコードを間違えていました。大変申し訳ございせん。戻るボタンは入力内容修正ボタンです。

2021/02/06 14:57

投稿

taizoyama
taizoyama

スコア3

test CHANGED
File without changes
test CHANGED
@@ -172,87 +172,69 @@
172
172
 
173
173
  ```view
174
174
 
175
- <form method="POST" action="{{ route('contact.confirm') }}">
176
-
177
- @csrf
178
-
179
-
180
-
181
- <label>お名前</label>
182
-
183
- <input
184
-
185
- name="name"
186
-
187
- value="{{ old('name') }}"
188
-
189
- type="text">
190
-
191
- @if ($errors->has('name'))
192
-
193
- <p class="error-message">{{ $errors->first('name') }}</p>
194
-
195
- @endif
196
-
197
-
198
-
199
- <label>メールアドレス</label>
200
-
201
- <input
202
-
203
- name="email"
204
-
205
- value="{{ old('email') }}"
206
-
207
- type="text">
208
-
209
- @if ($errors->has('email'))
210
-
211
- <p class="error-message">{{ $errors->first('email') }}</p>
212
-
213
- @endif
214
-
215
-
216
-
217
- <label>タイトル</label>
218
-
219
- <input
220
-
221
- name="title"
222
-
223
- value="{{ old('title') }}"
224
-
225
- type="text">
226
-
227
- @if ($errors->has('title'))
228
-
229
- <p class="error-message">{{ $errors->first('title') }}</p>
230
-
231
- @endif
232
-
233
-
234
-
235
-
236
-
237
- <label>お問い合わせ内容</label>
238
-
239
- <textarea name="body">{{ old('body') }}</textarea>
240
-
241
- @if ($errors->has('body'))
242
-
243
- <p class="error-message">{{ $errors->first('body') }}</p>
244
-
245
- @endif
246
-
247
-
248
-
249
- <button type="submit">
250
-
251
- 入力内容確認
252
-
253
- </button>
254
-
255
- </form>
175
+ <form method="POST" action="{{ route('contact.send') }}">
176
+
177
+ @csrf
178
+
179
+
180
+
181
+ <label>メールアドレス</label>
182
+
183
+ {{ $inputs['email'] }}
184
+
185
+ <input
186
+
187
+ name="email"
188
+
189
+ value="{{ $inputs['email'] }}"
190
+
191
+ type="hidden">
192
+
193
+
194
+
195
+ <label>タイトル</label>
196
+
197
+ {{ $inputs['title'] }}
198
+
199
+ <input
200
+
201
+ name="title"
202
+
203
+ value="{{ $inputs['title'] }}"
204
+
205
+ type="hidden">
206
+
207
+
208
+
209
+
210
+
211
+ <label>お問い合わせ内容</label>
212
+
213
+ {!! nl2br(e($inputs['body'])) !!}
214
+
215
+ <input
216
+
217
+ name="body"
218
+
219
+ value="{{ $inputs['body'] }}"
220
+
221
+ type="hidden">
222
+
223
+
224
+
225
+ <button type="submit" name="action" value="back">
226
+
227
+ 入力内容修正
228
+
229
+ </button>
230
+
231
+ <button type="submit" name="action" value="submit">
232
+
233
+ 送信する
234
+
235
+ </button>
236
+
237
+ </form>
256
238
 
257
239
  ```
258
240