<form action="{{ route('api.form-di') }}" file='true' method="POST" role="form" class="wpcf7-form init contact-page" enctype="multipart/form-data" data-status="init">
@csrf
<div style="display: none;">
<input type="hidden" name="_wpcf7" value="249">
<input type="hidden" name="_wpcf7_version" value="5.5.6.1">
<input type="hidden" name="_wpcf7_locale" value="pt_BR">
<input type="hidden" name="_wpcf7_unit_tag" value="wpcf7-f249-o2">
<input type="hidden" name="_wpcf7_container_post" value="0">
<input type="hidden" name="_wpcf7_posted_data_hash" value="">
</div>
<h2>{{__('Form DI')}}</h2>
<div class="form-group">
<span class="wpcf7-form-control-wrap nome">
<input type="text" name="numero" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required form-control" aria-required="true" aria-invalid="false" placeholder="{{ __('Number DI') }}">
<span role="alert" class="wpcf7-not-valid-tip" id="numero-alert"></span>
</span>
</div>
<div class="form-group">
<span class="wpcf7-form-control-wrap email">
<input type="text" name="email" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required form-control" aria-required="true" aria-invalid="false" placeholder="{{ __('Your e-mail') }}">
<span role="alert" class="wpcf7-not-valid-tip" id="email-alert"></span>
</span>
</div>
<div class="form-group">
<span class="wpcf7-form-control-wrap curric">
<input id='anexo-di' style="border: 1px solid var(--color-orange);" type="file" name="anexo-di" size="40" class="wpcf7-form-control wpcf7-file form-control" accept=".pdf,.doc,.docx,.xls" aria-invalid="false">
<span role="alert" class="wpcf7-not-valid-tip" id="resume-alert"></span>
<div class="testando"></div>
</span>
</div>
<div class="form-group">
<span class="wpcf7-form-control-wrap msg">
<textarea name="message" cols="40" rows="5" class="wpcf7-form-control wpcf7-textarea form-control" aria-invalid="false" placeholder="{{ __('Message') }}"></textarea>
<span role="alert" class="wpcf7-not-valid-tip" id="message-alert"></span>
</span>
</div>
<div class="form-group">
<span class="wpcf7-form-control-wrap news">
<span class="wpcf7-form-control wpcf7-checkbox">
<span class="wpcf7-list-item first last">
<input type="checkbox" name="send_me" value="1" />
<span class="wpcf7-list-item-label">{{ __('Send copy to me') }}</span>
</span>
</span>
</span>
</div>
<div class="form-group">
<input type="submit" value="{{ __('Send') }}" class="wpcf7-form-control has-spinner wpcf7-submit btn btn-primary btn-transp">
</div>
<div class="wpcf7-response-output" id="response-output" aria-hidden="true">
{{ __('Sent with success') }}
</div>
</form>
When I put theenctype="multipart/form-data"
to read input type type, it returns 400 bad request
route
use App\Http\Controllers\Site\SiteApiController;
use Illuminate\Support\Facades\Route;
Route::middleware('language')->name('api.')->group(function () {
Route::get('news', [SiteApiController::class, 'newsSearch'])->name('news');
Route::post('contact-us', [SiteApiController::class, 'contactUs'])->name('contact-us');
Route::post('form-di', [SiteApiController::class, 'formDI'])->name('form-di');
Route::post('work-with-us', [SiteApiController::class, 'workWithUs'])->name('work-with-us');
});
Need help to solve this
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/
Welcome to the Q&A site for web developers. Here you can ask a question about the problem you are facing and get answers from other experts. We have created a user-friendly interface so that you can quickly and free of charge ask a question about a web programming problem. We also invite other experts to join our community and help other members who ask questions. In addition, you can use our search for questions with a solution.
Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.