Last active
August 30, 2018 12:11
-
-
Save tosinonikute/732ce90b5aec98e8f29f8a8df5df3645 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
PHP | |
if(isset($_POST['question'])){ | |
$question = $_POST['question']; | |
foreach($question as $q){ | |
} | |
} | |
--> | |
<style> | |
.btn-question{ | |
color: #000 !important; | |
} | |
.btn-question:hover { | |
box-shadow: none !important; | |
} | |
</style> | |
<div class="question-div"> | |
<label class='col-xs-12 extra-ques'> | |
<div class='col-xs-9'> | |
<label class="col-xs-12 "><input type="text" name="question[]" class="form-control" /></label> | |
</label> | |
</div> | |
<button type="button" class="btn secondry add-role ask-another-question">Ask another question</button> | |
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> | |
<script> | |
$( document ).ready(function() { | |
$('.ask-another-question').click(function(){ | |
$('.question-div').append( "<label class='col-xs-12'><div class='col-xs-9'><input type='text' name='question[]' class='form-control' /></div><div class='col-xs-3'><button type='button' class='btn btn-cancel btn-question form-control remove-question'>Remove</button></div></label>" ); | |
}); | |
$(document).on('click', '.remove-question' ,function(){ | |
$(this).parent().parent().remove(); | |
}); | |
}); | |
</script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment