How to recover the value of a select option in Adonisjs?

Asked

Viewed 24 times

0

    <select class="custom-select mr-sm-2" id="inlineFormCustomSelect">

            <option name="tipo" value="MEMORIA" selected>MEMORIA</option>
            <option name="tipo" value="HD SSD">HD SSD</option>
            <option name="tipo"value="MONITOR">MONITOR</option>
            <option name="tipo"value="DATASHOW">DATASHOW</option>
            <option name="tipo"value="NOBREAK">NOBREAK</option>

Like input text I can recover with: hardware.type = request.input('type')

as it would be in a form with several options?

1 answer

0

You cannot use the name attribute in the option to be able to solve your problem you must enter only one name and that name must be in the parent or select.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.