AUZ Posted July 2, 2010 Report Share Posted July 2, 2010 Hello, I was hoping someone could help with changing this code so the pilots dont need to use the dropdown box just to select our Airline which is the only one listed there anyway.. I am looking at the PIREP.php and pirep_new.tpl files pirep_new.tpl at line 11 <dt>Select Airline:</dt> <dd> <select name="code" id="code"> <option value="">Select your airline</option> <?php foreach($allairlines as $airline) { $sel = ($_POST['code'] == $airline->code || $bid->code == $airline->code)?'selected':''; echo '<option value="'.$airline->code.'" '.$sel.'>'.$airline->code.' - '.$airline->name.'</option>'; } ?> </select> Is there any way I can customise this code to give no option to select and have my Airline preselected instead ? Any help would be mostly appreciated. Regards Adam Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 2, 2010 Administrators Report Share Posted July 2, 2010 Just remove the select, and use: <input type = 'hidden' name='code' value='airline code' /> Replace 'airline code' with your airline code you want to be the default Quote Link to comment Share on other sites More sharing options...
AUZ Posted July 3, 2010 Author Report Share Posted July 3, 2010 Thanks Nabeel, That worked, Most appreciated Regards Adam AUZ Quote Link to comment Share on other sites More sharing options...
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.