Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2013
    Location
    Finland/Estonia
    Posts
    53
    Thanks
    9
    Thanked 0 Times in 0 Posts

    All but 1 elements in a form are posting

    Hey. I got this form that has many fields in it.
    Code:
    <form action="../forms/f_newevent.php" method="post" id="newEventForm" name="newEventForm">
    	<input type="text" placeholder="Event Title" id="newEventTitle" name="newEventTitle" /> <br />
    	<p>Select Event Date:</p> <input type="text" id="datepicker" name="datepicker" maxlength="10"/><br />
    	<p>Event Time(24 hour format, example: <em>21:30</em>): </p><br/><input type="text" id="newTime" name="newTime" maxlength="5" /><br />
    	
    	<button type="button" class="wysiwyg_buttons" onClick="iBold()"><strong>Bold</strong></button>
    	<button type="button" class="wysiwyg_buttons" onClick="iUnderline()"><ins>Underline</ins></button>
    	<button type="button" class="wysiwyg_buttons" onClick="iItalic()"><em>Italic</em></button>
    	<br /><textarea name="newEventDescTxt" class="noDisplay" cols="100" rows="10" /></textarea> 
    	<iframe name="newEventDesc" id="newEventDesc" class="fakeTextField"></iframe><br />
    	<input type="submit" onclick="javascript:submit_form();" name="submit" value="Submit Event/Contest"/>
    	</form>
    </form>
    the form page:
    PHP Code:
       $postDate $_POST['datepicker']; 
    $newTitle $_POST['newEventTitle'];
    echo 
    "Posted Date: $postDate <br>";
    echo 
    "Title: $newTitle"
    Yes, that's PHP, but it's simple and there shouldn't be the problem in that.
    The title (and other stuff) is showing up, however, the datepicker/$postDate isn't. The date is selected to the field from JqueryUI's date selector. But it's submitted as normal text in d/m/Y format.
    Last edited by estXcrew; 01-16-2014 at 08:54 PM.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Is there another field in the form with name="datepicker" or is the attached JavaScript setting the datepicker field to disabled?
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Jul 2013
    Location
    Finland/Estonia
    Posts
    53
    Thanks
    9
    Thanked 0 Times in 0 Posts
    I've added the whole form, also, the JQueryUI Isn't setting the field to disabled.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •