A
A
Alexander2019-12-04 02:03:39
css
Alexander, 2019-12-04 02:03:39

Checkbox on/off, how to change value value?

The site has a form in which there is a select and the user must select one of the options.
But it's not usable and I want to change it to "switch" (input checkbox) on/off.

The checkbox is in the same bootstrap component: https://getbootstrap.com/docs/4.3/components/forms...

Depending on whether the checkbox is enabled or disabled, you need to change the value value to open or closed.

<select name="status">

<option value="open"></option>
<option value="closed"></option>

</select>

на 

<input type="checkbox" class="custom-control-input" name="status" value="">


Tell me, good people, how?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question