Answer the question
In order to leave comments, you need to log in
How to filter out unnecessary input value in email (modx revo + formit)?
There is the following construction: there are two products that can be selected by checkboxes. When choosing a product, with the help of js, an additional input appears, where you need to specify its quantity (default is "1")
Using the formit plugin, I implemented it this way:
<!-- Ручка -->
<input type="hidden" name="pen[]" value="">
<input type="checkbox" id="pen" name="pen[]" value="Ручка"
onclick="showHide('pen-input');" >
<label for="pen">Ручка</label>
<!-- Всплывающий инпут Ручки -->
<div id="pen-input" style="visibility:hidden">
<input type="text" id="pen-number" name="pen-number" value="1">
</div>
<!-- Товар-2 -->
<input type="hidden" name="pencil[]" value="">
<input type="checkbox" id="pencil" name="pencil[]" value="Карандаш"
onclick="showHide('pencil-input');" >
<label for="pencil">Карандаш</label>
<!-- Всплывающий инпут Карандаша -->
<div id="pencil-input" style="visibility:hidden">
<input type="text" id="pencil-number" name="pencil-number" value="1">
</div>
Покупатель выбрал:<br />
— <br />
—
Answer the question
In order to leave comments, you need to log in
Crutch variant, for the normal organization it is necessary to smoke to dock.
Покупатель выбрал:<br />
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question