KimberCat Posted May 24, 2006 Share Posted May 24, 2006 Hi,What we are trying to have is a php page that contains a form requesting info from the user. One of the input boxes is for a date. Our boss wants the user to be able to click on a calendar icon and select the date from the popup calendar. The date is then loaded in the input box - just like on an airlines reservation site. The problem is that this popup calendar function uses a form of it's own and I know that you can't nest forms. For example... <form> <div class="mediumtext1"> <strong>Event Date</strong></div> <div class="note">Please specify the day that the school will be closed/delayed or the day of the event<br>that is being postponed or cancelled.</div> <br> <label for="date"> Date <span class="sm">mm/dd/yy</span> </label> <form name="foo"> <input type="text" name="bar" /><a href="#" onclick="return getCalendar(document.foo.bar);"><img src="calendar.png" border="0" /></a> </form> <br> </form> This is just the section for the date. I have quite a bit more of input required from the user both before this section and after. The javascript puts the selected date in the input box. See [a href=\"https://www.zito9.com/test_public/calendar/index.html\" target=\"_blank\"]https://www.zito9.com/test_public/calendar/index.html[/a] I need to put this into a php page that has a form already. See [a href=\"https://www.zito9.com/test_public/close_info.php\" target=\"_blank\"]https://www.zito9.com/test_public/close_info.php[/a] for the page that we want to modify to have this feature. Our boss has required the popup calendar for the date selection. Is there a workaround for this? Thanks, Kimber Link to comment https://forums.phpfreaks.com/topic/10380-js-pop-up-calendar-within-a-form-on-a-php-page/ Share on other sites More sharing options...
AndyB Posted May 24, 2006 Share Posted May 24, 2006 Don't place the date picker in a separate form, just make it another one of the inputs to your form.I've used the datepicker from [a href=\"http://www.rainforestnet.com/datetimepicker.htm\" target=\"_blank\"]http://www.rainforestnet.com/datetimepicker.htm[/a] and it's ideal for this kind of application. Supports any kind of date format you need. Link to comment https://forums.phpfreaks.com/topic/10380-js-pop-up-calendar-within-a-form-on-a-php-page/#findComment-38673 Share on other sites More sharing options...
KimberCat Posted May 24, 2006 Author Share Posted May 24, 2006 [!--quoteo(post=376776:date=May 24 2006, 02:41 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ May 24 2006, 02:41 PM) [snapback]376776[/snapback][/div][div class=\'quotemain\'][!--quotec--]Don't place the date picker in a separate form, just make it another one of the inputs to your form.I've used the datepicker from [a href=\"http://www.rainforestnet.com/datetimepicker.htm\" target=\"_blank\"]http://www.rainforestnet.com/datetimepicker.htm[/a] and it's ideal for this kind of application. Supports any kind of date format you need.[/quote]Thanks, this did what I needed it to do. Link to comment https://forums.phpfreaks.com/topic/10380-js-pop-up-calendar-within-a-form-on-a-php-page/#findComment-38709 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.