Answer the question
In order to leave comments, you need to log in
How to transfer data to the infoblock using a form, on AJAX?
<form class="review-form">
<input class="input" type="text" placeholder="Your Name">
<input class="input" type="email" placeholder="Your Email">
<textarea class="input" placeholder="Your Review"></textarea>
<div class="input-rating">
<span>Your Rating: </span>
<div class="stars">
<input id="star5" name="rating" value="5" type="radio"><label for="star5"></label>
<input id="star4" name="rating" value="4" type="radio"><label for="star4"></label>
<input id="star3" name="rating" value="3" type="radio"><label for="star3"></label>
<input id="star2" name="rating" value="2" type="radio"><label for="star2"></label>
<input id="star1" name="rating" value="1" type="radio"><label for="star1"></label>
</div>
</div>
<button class="primary-btn">Submit</button>
</form>
Answer the question
In order to leave comments, you need to log in
1. Add the action="create_form.php" handler for the form
2. Get the form data in the $_POST array
3. Pass the received values to the keys of the $arLoadProductArray parameters array
4. Then create a new element new CIBlockElement
https://dev.1c-bitrix. en/api_help/iblock/classes/c...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question