i have form like this
<div id="signUp" class="form-inline">
<div class="form-group">
<label for="">I Sign up as</label>
<input id="placehold" type="text" class="form-control text-center" readonly/>
<div class="smallspace"></div>
<div class="displayTable">
<div class="radio-inline">
<input type="radio" class="radio_item" value="Company" name="item" id="radioCompany">
<label class="label_item" for="radioCompany"></label>
<p class="text-center colorGrey">Company</p>
</div>
<div class="radio-inline">
<input type="radio" class="radio_item" value="Chef" name="item" id="radioChef">
<label class="label_item" for="radioChef"></label>
<p class="text-center colorGrey">Chef</p>
</div>
<div class="radio-inline">
<input type="radio" class="radio_item" value="Food lover" name="item" id="radioFoodLover">
<label class="label_item" for="radioFoodLover"></label>
<p class="text-center colorGrey">Food lover</p>
</div>
</div>
</div>
</div>
<script src="js/upload.js"></script>
inside upload js i code like this
(function($) {
"use strict";
// register
$(document).ready(function() {
$('#signUp input').on('change', function() {
var signUp = $(this).val();
$("#placehold").val(signUp);//show value of chosen radio button to input text
});
});
})(jQuery);
summary this code is, i have input text(readonly) and 2 radio button, when we choose the radio button then system will get the value of the choosen than show it to the input type text.
the reason i put the validation to other file because honestly it got so much validation, for another input too. i just didnt like it if i have to place the validation inside html file.
my question is: is it posible to get that value and store it to database via PHP?
Aucun commentaire:
Enregistrer un commentaire