Populating cities

Posts: 23
Joined: 03/13/2008

This is how far I got...Could someone help me to completion.

Here is what I am trying to do.

Trying to change the "textfield" in uc_cart_checkout_form into a "select" field and populate it with a few cities.

For testing I added a check box

I was able to change the title for the "city" now I want it to be of type select and be populated with City1,City2, etc... but was unable to make it happen.

Below is the code.

<?php
function test_form_alter($form_id, &$form) {

  if(
$form_id == "uc_cart_checkout_form")  {

 
$form['test_checkbox'] = array(
   
'#type' => 'checkbox',
   
'#title' => t('Newly Added Test CheckBox'),
    );

 
$form['panes']['delivery']['delivery_city']['#title'] = "TESTING 123";
 
  }
}
?>

CIF files. By: greenSkin (15 replies) Wed, 12/19/2007 - 20:17