skip to Main Content

How can I create a dynamic form in HTML?

Im trying to create something like this https://docs.google.com/document/d/1wu2J2Jp4KAYEVyQ6B7KSGFp_7oeDttH7DwOPLMARfws/edit . Dynamic form that changes according to selection from dropdown menu. <div class="typeSwitcher"> <form class="#productType" id="productType" action="/product_type.php"> <label for="type">Type Switcher</label> <select name="type" id="type" onchange="myFunction()"> <option value="DVD" id="#DVD" onchange="dvdFunction()">DVD</option> <option value="Book" id="#Book" onchange="bookFunction()">Book</option>…

VIEW QUESTION

Is the array key defined for the HTML-PHP form using Post?

HTML: <form action="submit.php" method="POST" > <div class="file-input"> <input type="file" class="attestat" id="attestat" name="attestat" accept="application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, image/*" multiple="multiple"> <span class="file-name">Выберите файл</span> </div> </form> and PHP: <?php $servername = "localhost"; $username = "root"; $password = "Youshit21"; $dbname = "medacc"; $conn = new…

VIEW QUESTION

Get data as object after form submit in jQuery

I am building a website that can send custom data after submission with the below code. $('form').submit((e)=>{ e.preventDefault(); let data = $('form').serializeArray(); console.log(data); $.ajax({ url: 'path/to/submit', type: 'POST', data: data, success: (res) => { console.log(res); } }) }); form {…

VIEW QUESTION
Back To Top
Search