php - Laravel and Bootstrap - Form with no action still sending data -


i'm working on laravel site built else , 1 of pages has form on doesn't have action or obvious location data gets sent to, yet still sends data back-end.

the form below found on portal.blade.php - can't find in there resembling form::

if delete classes 'inspiring' & 'submit' submit button form stops working.

live page: http://amazingyou.bravissimo.com/about

<!-- modal --> <div class="inspiring modal fade"    id="mymodal"    tabindex="-1"    role="dialog"    aria-labelledby="mymodallabel"    aria-hidden="true">   <div class="modal-dialog">     <div class="modal-content">       <div class="modal-header">         <button type="button"           class="close" data-dismiss="modal" aria-label="close">           <span aria-hidden="true">&times;</span>         </button>         <h4 class="modal-title" id="mymodallabel">your amazing story</h4>       </div>       <div class="modal-body">         <form>           <p>             <input class="name" placeholder="your name" value="">           </p>           <p>             <input class="title" placeholder="story title" value="">           </p>           <p>             <textarea class="story"                placeholder="your story (max. 150 words)"></textarea>           </p>         </form>         <div class="results" style="display:none">           thank amazing story         </div>         <div class="character-limit" style="display:none">           please limit story 150 words         </div>       </div>       <div class="modal-footer">         <button type="button"            class="btn btn-default"            data-dismiss="modal">close</button>         <button            onclick="ga('send', 'event', 'amazing_story', 'click', 'submit_story');"            type="button"            class="btn btn-primary inspiring submit">submit</button>       </div>     </div>   </div> </div> 

it appears form being submitted javascript. through javascript source files being included on page. if using jquery,

$('.inspiring').bind('click', function(e){ ... }); 

if regular javascript for

document.forms[0].onsubmit = function () { ... } ); 

inside there doing ajax request, or set action , submit form there.

edited per comments

the form being submitted javascript file.

http://amazingyou.bravissimo.com/js/user_inspiring_backbone.js

line 2 url form set here.

inspiringstories = backbone.model.extend({     urlroot: '/inspiring-stories',     defaults: {      },     initialize: function(){     } }); 

lines 17-19 set click event.

events: {     "click .inspiring.submit": "clicked" }, 

line 21 starts clicked function

line 78 submit form when hit model.save, between lines 21 & 78 form validation.

this.model.save([],{     datatype:"text",     success:function(response) {console.log(response)},     error:function() {} }); 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -