Group Admins

WordPress Troubleshooting and Support

Public Group active 1 year, 2 months ago ago

WordPress support from our community

Put date picker into page that lets me change page display

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #2993
    Margarete Koenen

    I am creating charts based on data provided by previously created Gravity form entries into pages.

    Now I want to allow the user to limit the information displayed. So I added input fields to the template and a jQuery datepicker. This all works, but I can’t figure out how to catch the user input.

    My jQuery is very simple:

    jQuery(document).ready(function($) {
      			changeMonth: true,
      			changeYear: true,
      			dateFormat : "yy-mm-dd",
      			changeMonth: true,
      			changeYear: true,
      			dateFormat : "yy-mm-dd",

    In my template file I have the following

    <form action="page-experiment.php" method="post">
          <p>Select Start Date</p> 
          <input type="text" id="startdate" name="startdate" />
          <p>Select End Date</p>
          <input type="text" id="enddate" name="enddate" />
          <input type="submit" id="submit" name="submit" value="Submit" />
      $start_date = $_POST['startdate']; 
      $end_date = $_POST['enddate']; 

    I tried variations of the action url but nothing seems to work. On submit I get a “nothing found” message.

    I have spent a few hours on this and searched the internet but have not found any answers. I would really appreciate any help you could give.

    Margarete Koenen

    I figured it out. “action” has to be empty. So it looks like this:

    <form action="" method="post">

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.