Forums / All Other Contributions/Addons / captialize_signup_fields mod javascript conflicts with Account address State pulldown

captialize_signup_fields mod javascript conflicts with Account address State pulldown

Locked

Started by dw08gm on 1 Feb 2010, 10:12 AM · Views: 1,055

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
1 Feb 2010, 10:12 AM
#1
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,022
Plugin Contributions:
2

captialize_signup_fields mod javascript conflicts with Account address State pulldown

The following snippet of code is from includes\templates\mytemplate\templates\tpl_modules_create_account.php, but applies to other files dealing with account addresses.

<?php
  if (ACCOUNT_STATE == 'true') {
    if ($flag_show_pulldown_states == true) {
?>
<label class="inputLabel" for="stateZone" id="zoneLabel"><?php echo ENTRY_STATE; ?></label>
<?php
      echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $zone_id, 'id="stateZone"');
      if (zen_not_null(ENTRY_STATE_TEXT)) echo '<span class="alert">' . ENTRY_STATE_TEXT . '</span>';
    }
?>

<?php if ($flag_show_pulldown_states == true) { ?>
<br class="clearBoth" id="stBreak" />
<?php } ?>
<label class="inputLabel" for="state" id="stateLabel"><?php echo $state_field_label; ?></label>
<?php
    echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state" onchange="capitalize(this,1);"');
    if (zen_not_null(ENTRY_STATE_TEXT)) echo '<span class="alert" id="stText">' . ENTRY_STATE_TEXT . '</span>';
    if ($flag_show_pulldown_states == false) {
      echo zen_draw_hidden_field('zone_id', $zone_name, ' ');
    }
?>
<br class="clearBoth" />
<?php
  }
?>

Note the inclusion of onchange="capitalize(this,1);" in the tenth (10th) line from the end of this snippet, which is from the captialize_signup_fields mod.

With this inclusion I notice when editing the account address, either during or after account creation, that sometimes two State input boxes appear one atop the other, with the topmost input box being that of the pulldown.

Such corruption makes me want to get rid of the pulldown altogether, however, it is not clear to me just what I should remove.

I would appreciate if someone could help me either fix the corruption or remove the pulldown facility.

TIA

1 Feb 2010, 10:19 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: captialize_signup_fields mod javascript conflicts with Account address State pulldown

Any chance it's something other than the capitalization mod?

http://www.zen-cart.com/forum/showthread.php?t=85350

1 Feb 2010, 10:38 AM
#3
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,022
Plugin Contributions:
2

Re: captialize_signup_fields mod javascript conflicts with Account address State pulldown

Stevesh

Thanks for the quick reply and for the link which offers many ideas.

I am running v138a and the over the last few days have been tweaking the many account address files with

captialize_signup_fields mod
PO Box Ban Mod
SuperOrders_2ver48 (yet to be officially released)

So far as I have been able to ascertain, having already WinMerge-checked the original files, the first-named mod was the only one to have altered the State address code.

While I will study the link, any further comments or insights would be appreciated.

6 Feb 2010, 10:27 AM
#4
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,022
Plugin Contributions:
2

Re: captialize_signup_fields mod javascript conflicts with Account address State pulldown

Problem fixed.

I had inadvertently added

onchange="capitalize(this,1);" 

after

id="state"

in the pulldown code of one of the other account files.