Menu icon Foundation
Perform standard post action with Abide Ajax

To have my PHP framework (Laravel4) handle the actual post action after Abide validates the input, how do I code that into the provided JS?
Lets say I wanted to post to 'RecordController@postNew' action?
The provided code seams to only target the one field 'users_name'. Any way to have it submit the whole form date?

//in the php file after ther form code
<script>
$('input[name="users_name"]').on('valid', function() {
  // Handle the submission of the form
});    
</script>            

         

abideAJAXform validationPHP

To have my PHP framework (Laravel4) handle the actual post action after Abide validates the input, how do I code that into the provided JS?
Lets say I wanted to post to 'RecordController@postNew' action?
The provided code seams to only target the one field 'users_name'. Any way to have it submit the whole form date?

//in the php file after ther form code
<script>
$('input[name="users_name"]').on('valid', function() {
  // Handle the submission of the form
});    
</script>            

         
Effe over 5 years ago

I tried this, does not work (where the name of the form is 'create')
Javascript
$('create').on('valid', function() {
var formdata = $('create').serializeArray();
var url = $('RecordController').attr('postNew');
$.post(url, {formdata}, function(data) {
console.log(data);
}, 'json');
});

Zack about 5 years ago

If you're having the same problem of me, you can get "under" the JQuery stuff with:

 $('#form').get(0).submit();

Complements of ceejayoz at StackOverflow
http://stackoverflow.com/questions/24189316/foundation-5-abide-normal-submit?noredirect=1#comment37341135_24189316