回答編集履歴

2

修正

2019/11/26 08:31

投稿

退会済みユーザー
test CHANGED
@@ -1 +1,119 @@
1
- form が 入れ子になってしまってますね。
1
+ form が 入れ子になってしまってますね。(しかも不完全に)
2
+
3
+
4
+
5
+ ```
6
+
7
+ <div class = "create_baby under_box">
8
+
9
+ <form action="/baby" method="post">
10
+
11
+ <div class="form-group">
12
+
13
+ <label for="name">おなまえ</label>
14
+
15
+ <input type="text" class="form-control" name="name">
16
+
17
+ </div>
18
+
19
+ <div class="form-group">
20
+
21
+ <label for="price">お誕生日</label>
22
+
23
+ <input type="text" class="form-control" name="birthday">
24
+
25
+ </div>
26
+
27
+ <div class="form-group">
28
+
29
+ <label for="price">写真</label>
30
+
31
+ <form method="post" action="{{ action('BabiesController@store') }}" enctype="multipart/form-data">
32
+
33
+ {{ csrf_field() }}
34
+
35
+ <fieldset>
36
+
37
+ <div>
38
+
39
+ <input id="file" type="file" name="image">
40
+
41
+ @if ($errors->has('image'))
42
+
43
+ {{ $errors->first('image') }}
44
+
45
+ @endif
46
+
47
+ </div>
48
+
49
+ </fieldset>
50
+
51
+ </div>
52
+
53
+ <button type="submit" class="btn btn-default">登録</button>
54
+
55
+ <a href="/baby">戻る</a>
56
+
57
+ </form>
58
+
59
+ </div>
60
+
61
+ ```
62
+
63
+
64
+
65
+ ```
66
+
67
+ <div class = "create_baby under_box">
68
+
69
+ <form method="post" action="{{ action('BabiesController@store') }}" enctype="multipart/form-data">
70
+
71
+ <div class="form-group">
72
+
73
+ <label for="name">おなまえ</label>
74
+
75
+ <input type="text" class="form-control" name="name">
76
+
77
+ </div>
78
+
79
+ <div class="form-group">
80
+
81
+ <label for="price">お誕生日</label>
82
+
83
+ <input type="text" class="form-control" name="birthday">
84
+
85
+ </div>
86
+
87
+ <div class="form-group">
88
+
89
+ <label for="price">写真</label>
90
+
91
+ {{ csrf_field() }}
92
+
93
+ <fieldset>
94
+
95
+ <div>
96
+
97
+ <input id="file" type="file" name="image">
98
+
99
+ @if ($errors->has('image'))
100
+
101
+ {{ $errors->first('image') }}
102
+
103
+ @endif
104
+
105
+ </div>
106
+
107
+ </fieldset>
108
+
109
+ </div>
110
+
111
+ <button type="submit" class="btn btn-default">登録</button>
112
+
113
+ <a href="/baby">戻る</a>
114
+
115
+ </form>
116
+
117
+ </div>
118
+
119
+ ```

1

修正

2019/11/26 08:31

投稿

退会済みユーザー
test CHANGED
@@ -1,15 +1 @@
1
- ```html
2
-
3
- <form action="/baby" method="post">
1
+ form 入れ子になってしまってますね。
4
-
5
- ```
6
-
7
-
8
-
9
-
10
-
11
- ```html
12
-
13
- <form action="/baby" method="post" enctype="multipart/form-data">
14
-
15
- ```