Jump to content

Airlines and Registrations [SOLVED]


Zach

Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

  • Moderators

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>

  • Thanks 1
Link to comment
Share on other sites

  • 9 months later...
  • 10 months later...

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 :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...