Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use of $state_field_label/two labels in Shipping Estimator #4810

Open
torvista opened this issue May 21, 2022 · 0 comments
Open

use of $state_field_label/two labels in Shipping Estimator #4810

torvista opened this issue May 21, 2022 · 0 comments

Comments

@torvista
Copy link
Member

<label class="inputLabel" for="stateZone" id="zoneLabel"><?php echo ENTRY_STATE; ?></label>
<?php
if ($flag_show_pulldown_states) {
?>
<?php echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $state_zone_id, 'id="stateZone"');?>
<br class="clearBoth" id="stBreak">
<?php
}
?>
<label class="inputLabel" for="state" id="stateLabel"><?php echo (isset($state_field_label) ? $state_field_label : ''); ?></label>
<?php echo zen_draw_input_field('state', $selectedState, zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"') .'&nbsp;<span class="alert" id="stText">&nbsp;</span>'; ?>
<br class="clearBoth">

Above code shows
the label for the state dropdown,
the optional state dropdown
the label for the state input field
the state input field

  1. Why two labels for the same item "state"?
  2. What is the expected usage of the $state_field_label variable? This exists in other places where the State field is used but not for the shipping estimator. If here it is empty (which seems to be always the case), the label is hidden by js.
    Why have it at all/have just one label?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant