我的 Netlify 没有从我的 Web 表单中捕获数据。它正在记录提交,但所有字段都是空的。它只是吐出字段标题而不是字段内容。我有一个非常基本的注册表单。一点都不花哨。根据他们网站上的说明,我添加了表单名称和data-netlify="true"
属性。我尝试提交表格。没运气。我还需要做些什么才能使其正常工作吗?这是我的表单的 html。
<form name="Fleet Signup" data-netlify="true" class="simple_form" method="post">
<input name="_csrf_token" type="hidden">
<div class="form-inputs mt-4 font-thin text-gray-700">
<div class="flex justify-between">
<div class="input mt-2 mr-2 w-full">
<div class="label hidden">
<label class="control-label" for="user_first_name">First name</label>
</div>
<div class="field">
<input class="form-control border border-gray-300 p-3 rounded w-full font-medium" id="user_first_name" name="user[first_name]" placeholder="First Name" type="text">
</div>
</div>
<div class="input mt-2 w-full">
<div class="label hidden">
<label class="control-label" for="user_last_name">Last name</label>
</div>
<div class="field">
<input class="form-control border border-gray-300 p-3 rounded w-full font-medium" id="user_last_name" name="user[last_name]" placeholder="Last Name" type="text">
</div>
</div>
</div>
<div class="input mt-2 w-full">
<div class="label hidden">
<label class="control-label" for="user_email">Email</label>
</div>
<div class="field">
<input class="form-control border border-gray-300 p-3 rounded w-full font-medium" id="user_email" name="user[email]" placeholder="Email Address" type="email">
</div>
</div>
<div class="input mt-2 w-full">
<div class="label hidden">
<label class="control-label" for="user_password">Password</label>
</div>
<div class="field">
<input class="form-control border border-gray-300 p-3 rounded w-full font-medium" id="user_password" name="user[password]" placeholder="Password" type="password">
</div>
</div>
<div class="input mt-2 w-full">
<div class="label hidden">
<label class="control-label" for="user_phone_number">Company</label>
</div>
<div class="field">
<input class="form-control border border-gray-300 p-3 rounded w-full font-medium" id="user_phone_number" name="user[phone_number]" placeholder="Phone" type="phone">
</div>
</div>
<div class="input mt-2 w-full">
<div class="label hidden">
<label class="control-label" for="user_terms_of_service">Terms of service</label>
</div>
<div class="field">
<input name="user[terms_of_service]" type="hidden" value="false"><input class="form-control" id="user_terms_of_service" name="user[terms_of_service]" type="checkbox" value="true">
<span class="p-2 font-medium text-xs">
I agree to Fleet's <a class="underline" target="_blank" href="#../legal.html#terms-of-service">Terms of service</a> and consent to it's <a class="underline" target="_blank" href="#../legal.html#developer-privacy-policy">Privacy policy</a>.
</span>
</div>
</div>
</div>
<div class="form-actions mt-4">
<button class="px-4 py-3 w-full font-bold text-white bg-black rounded" type="submit">Next</button>
</div>
</form>