T
T
Taras Parashchuk2020-12-09 19:01:56
Laravel
Taras Parashchuk, 2020-12-09 19:01:56

How to read radio value from LARAVEL?

Hello.
How to read radio value from LARAVEL ?

<form action="{{ route('file.upload.post') }}" method="POST" id="uploadpriceform" enctype="multipart/form-data">
                    @csrf
                    <div class="form-check">
                        <input class="form-check-input" type="radio"  name="ftype[1]" id="1"  value="CSV" checked>
                        <label class="form-check-label" for="flexRadioDefault1">
                            CSV
                        </label>
                    </div>
                    <div class="form-check pb-3">
                        <input class="form-check-input" type="radio"  name="ftype[2]" id="2" value="TXT">
                        <label class="form-check-label" for="flexRadioDefault2">
                            TXT
                        </label>
                    </div>
                    <div class="form-group">
                        <div>
                            <input type="file" name="file" id="uploadpricefile">
                        </div>
                    </div>
                    <div class="modal-footer">
                    <button type="button" class="btn btn-primary" id="loadprice" >
                        <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" id="spinner1"></span>
                        Загрузить
                    </button>
                    </div>
                </form>

Nothing comes out;
$ftype = $request->ftype;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2020-12-09
@Sanes

name="ftype"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question