Jump to content

registration_mainform.tpl edit [SOLVED]


Jeff

Recommended Posts

I have edited this code until I was blue in the face :unsure:. I can't seem to figure out how to remove the code (AA - American Airlines) and have it list the airlines alphabetically...

American Airlines

British Airways

Continental Airlines

...and so on

<dt>Select Airline: <font color="#FF0000">*</font></dt>
<dd>
	<select name="code" id="code">
	<?php
	foreach($allairlines as $airline)
	{
		echo '<option value="'.$airline->code.'">'.$airline->code.' - ('.$airline->name.')</option>';
	}
	?>
	</select>
</dd>

Link to comment
Share on other sites

  • Administrators

Remove this peice:

'.$airline->code.'

So it's:

<dt>Select Airline: <font color="#FF0000">*</font></dt>
       <dd>
               <select name="code" id="code">
               <?php
               foreach($allairlines as $airline)
               {
                       echo '<option value="'.$airline->code.'">'.$airline->name.'</option>';
               }
               ?>
               </select>
       </dd> 

Sorting should be alpha by default

Link to comment
Share on other sites

  • 2 weeks later...

The SQL is in the getAllAirlines() function in OperationsData.class:

if($all_airlines === false)
{
$sql = 'SELECT * FROM ' . TABLE_PREFIX ."airlines 
        $where}
        ORDER BY `code` ASC";

$all_airlines= DB::get_results($sql);
CodonCache::write($key, $all_airlines, 'long');
}

You could change the ORDER BY clause, but I don't know if that might break something somewhere else.

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...