lundi 30 janvier 2017

inputs loaded through ajax don't appear in request body

I have form, with two hidden inputs and submit button in my bootstrap modal

<form method="POST" action="http://ift.tt/2kiIBV4" accept-charset="UTF-8" id="editVideoForm">
<div class="modal-body modal-video-cont">
    <div class="modal-body-container">

    </div>
</div>
<div class="clearfix"></div>
<div class="modal-footer">
    <div class="col-md-5 col-md-offset-7">
        <input class="btn green pull-left ddf_button_pad" name="update_video_form" type="submit" value="Save">

        <button data-dismiss="modal" type="button" class="btn green btn-outline pull-right ddf_button_pad">Cancel</button>

        <input class="position-input" id="editVidTempPos" name="template_position" type="hidden">
        <input id="editVidType" name="type" type="hidden" value="video">
    </div>
</div>

in <div class="modal-body-container"> element I load content(which contains radio buttons) through ajax(works fine)

<input type="radio" class="blockRadio video-input" name="resource" data-position="" value="http://ift.tt/2kFctZA" style="position: absolute; opacity: 0;">

<input type="radio" class="blockRadio video-input" name="resource" data-position="" value="http://ift.tt/2kFctZA" style="position: absolute; opacity: 0;">

however when i submit form, i don't see these radio elements in request body(there should be resource index)

"_token" => "FF1zRnyORk9BzBUIWTj13PI06SZxYld1iLfpNZ0e"
"template_position" => "6"
"type" => "video"

how can I fix it? I'm using laravel framework(if it's matter:)



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire