0 Replies - 304 Views - Last Post: 19 February 2012 - 01:30 AM

#1 thatgoogleguy   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 76
  • Joined: 26-May 11

jQuery Mobile, multi-file and page submit form

Posted 19 February 2012 - 01:30 AM

I have a website that I've built using jQuery mobile, but I find it easier to separate parts of the site (each page) in a separate php file and use the php include function to combine all my files into one final project. Of course I'm using jQuery necessary syntax like "data-role="page". The issue I have is submitting the data using jQuery mobile to my remote database and saving the form contents. The single form is split into multiple files (where the form is not being closed until the final page). Will this work? Ex:

<!-- page one, pretend its in a file called formpart1.php -->
<form id ="my_form" action"submit.php">

<input type="radio" name="pay-weekly" id="pay-weekly" value="pay-weekly" checked="checked" />

<label for="bi-weekly">Bi-weekly</label>
<input type="radio" name="bi-weekly" id="bi-weekly" value="bi-weekly"  />

<label for="twice-monthly">Twice-Monthly</label>
<input type="radio" name="twice-monthly" id="twice-monthly" value="twice-monthly"  />

<!-- page two, pretend it's in a file called formpart2.php -->

<input type="text" name="current_mpg" id="current_mpg" value="" placeholder="Current Vehicle MPG">
<input type="text" name="new_mpg" id="new_mpg" value="" placeholder="New Vehicle MPG">

<button type="submit" value="submit">Submit</button
</form>



Ignore any code syntax errors you spot. For the most part this is pseudo code. I just need to know if this is even possible. I'm scratching my head. :neat:

Is This A Good Question/Topic? 0
  • +

Page 1 of 1