Dyl1103 Posted October 29, 2020 Report Posted October 29, 2020 Hello! I'm hoping someone can help! I'm looking to use a search text box instead of a dropdown menu on our Schedule Search page (http://flyhighva.net/index.php/schedules) I'm smart enough to realize that the file I want to play around with is schedule_searchform.php I am NOT smart enough, however, to mess around too much without breaking something. I'm good at editing and building off of someone else's start - but I for the life of me can't start something new (if that makes any sense, lol) The area of code I'm looking at changing to allow a pilot to enter a ICAO code instead of searching the never-ending dropdown menu is lines 16 thru 45: <div id="depapttab"> <p>Select your departure airport:</p> <select id="depicao" name="depicao"> <option value="">Select All</option> <?php if(!$depairports) $depairports = array(); foreach($depairports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao .' ('.$airport->name.')</option>'; } ?> </select> <input type="submit" name="submit" value="Find Flights" /> </div> <div id="arrapttab"> <p>Select your arrival airport:</p> <select id="arricao" name="arricao"> <option value="">Select All</option> <?php if(!$depairports) $depairports = array(); foreach($depairports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao .' ('.$airport->name.')</option>'; } ?> </select> Any suggestions on where to start? Using Simpilot's 5.5x version of phpVMS. Thanks! Quote
web541 Posted October 29, 2020 Report Posted October 29, 2020 I would change this: <select id="depicao" name="depicao"> <option value="">Select All</option> <?php if(!$depairports) $depairports = array(); foreach($depairports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao .' ('.$airport->name.')</option>'; } ?> </select> to this: <input type="text" name="depicao" id="depicao" placeholder="Enter Departure ICAO..." /> and do the same for the arrival airport as well, just change all the depicao to arricao in the new input. Hope that helps. Quote
Dyl1103 Posted October 29, 2020 Author Report Posted October 29, 2020 4 hours ago, web541 said: I would change this: <select id="depicao" name="depicao"> <option value="">Select All</option> <?php if(!$depairports) $depairports = array(); foreach($depairports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao .' ('.$airport->name.')</option>'; } ?> </select> to this: <input type="text" name="depicao" id="depicao" placeholder="Enter Departure ICAO..." /> and do the same for the arrival airport as well, just change all the depicao to arricao in the new input. Hope that helps. Worked like a charm. Thanks for the assist! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.