Zach Posted May 16, 2013 Report Posted May 16, 2013 Hi all, How can i edit the code for my registration form, and only allow the registree to select 1 airline (our main one), out of many? Currently, i have a script where it will default you to the main airline, even if you select another one. However, we are adding a number of codeshares, and it would be ideal not to have 15-20 options of airlines to choose from when registering. So, again, my question is: How can i edit the code for my registration form, and only allow the registree to select 1 airline (our main one), out of many others? www.cathaypacificva.com Quote
Moderators servetas Posted May 16, 2013 Moderators Report Posted May 16, 2013 You may create a hidden field on the registration form: <input type="hidden" name="code" id="code" value="Company's code" /> Where Company's code use HDA for example. And after that, you may remove the select airline field from the registration form. Quote
Moderators Parkho Posted May 16, 2013 Moderators Report Posted May 16, 2013 Alternatively, you could use the follwoing to show only the main airline in the select box: <dd> <select name="code" id="code"> <?php foreach($allairlines as $airline) { if($airline->code == "ABC")//"ABC" is your 3 letter airline's code. { echo '<option value="'.$airline->code.'">'.$airline->code.' - '.$airline->name.'</option>'; } } ?> </select> </dd> 1 Quote
Zach Posted May 16, 2013 Author Report Posted May 16, 2013 Cheers servetas; that fixed it perfectly. Thanks also Parkho, a great help as usual! Quote
Junior Posted February 19, 2014 Report Posted February 19, 2014 sorry to reactivate the topic but how can I do this? Quote
Moderators servetas Posted February 19, 2014 Moderators Report Posted February 19, 2014 What do you mean? You will have to edit your registration_form.tpl file. Quote
Caporrella Posted February 20, 2014 Report Posted February 20, 2014 It's more easy than it looks: when you add an airline unchek "enabled", you will be able to add schedules but user can't select it in registration form! 1 Quote
Junior Posted February 20, 2014 Report Posted February 20, 2014 done! thank you guys for the support Quote
Txmmy83 Posted January 19, 2015 Report Posted January 19, 2015 It's more easy than it looks: when you add an airline unchek "enabled", you will be able to add schedules but user can't select it in registration form! yeah that works but if I remember right it causes troubles if you have Pilots using manual PIREP submit as any unchecked Airline is not selectable for PIREP submit too 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.