Welcome Guest, Not a member yet? Register   Sign In
codeiginiter validation and submit jquery action

Dear all,

Before I am using bootstrap php to make a web site. In submit button I have to check some validation. Now I have also used codeiginiter validation with form_open(xxxx), But that makes my submit button jQuery has not been called. How can I do to make both works??? before or after??

<?php $prevURLPATH=urlencode($prevURL); echo form_open('newPost/'.$userID.'/'.$username.'?prevURL='.$prevURLPATH); ?>

<div class="form-group row">
<label class="col-md-3 control-label text-center"></label>
<div class="col-md-8">
<button id="submit-upload-form" class="btn btn-primary btn-tw" onclick="setup(); return false;"><i class="glyphicon glyphicon-upload"></i>Submit</button>
<button id="validate" hidden="true" type="submit"></button>

function setup()
{ .......Checking some fields in the form...............}

Theme © iAndrew 2016 - Forum software by © MyBB