Depends upon the select option value change click displaying textbox name and number of displaying text box will changed with my ajax.But i tried to validate that text box in submit button. But that textbox values are not keep while submit button click...
MY question is ajax response div is not able to keep that values while submit???
Ajax response div:
<?php
foreach ($technical_skill as $skills){
?>
<div class="form-group col-md-12">
<div class="col-md-4">
<label for="bsl"><?php echo $skills['techskills'];?></label>
</div>
<div class="col-md-8">
<input type="text" class="form-control technicalskill" name = "technicalskill[<?php echo $skills['id']; ?>]" id="bsl">
</div>
</div><?php
}
?>
Jquery Ajax:
$('#tskill').click(function(){
var parentid = $(this).val();
var text = $('option:selected', this).text();
$.ajax({
type:"POST",
url:"index.php",
data:{parentid:parentid},
success:function(response){
if(parentid == ''){
$('#tech_head').css('display','none');
}else{
$('.tech_skill').html(response);
$('.tech_group').text('Technical Skill: '+text);
$('.hide-div').css('display','block');
}
}
});
});