eg:
ZC154
ZC155<?php
echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"');
if (zen_not_null(ENTRY_STATE_TEXT)) echo ' <span class="alert" id="stText">' . ENTRY_STATE_TEXT . '</span>';
if ($flag_show_pulldown_states == false) {
javascript<?php
echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state" placeholder="' . ENTRY_STATE_TEXT . '"');
if ($flag_show_pulldown_states == false) {
Since stText does not exist, the javascript bails out of the function at this point.function hideStateField(theForm) {
theForm.state.disabled = true;
theForm.state.className = 'hiddenField';
theForm.state.setAttribute('className', 'hiddenField');
document.getElementById("stateLabel").className = 'hiddenField';
document.getElementById("stateLabel").setAttribute('className', 'hiddenField');
document.getElementById("stText").className = 'hiddenField';
document.getElementById("stText").setAttribute('className', 'hiddenField');
document.getElementById("stBreak").className = 'hiddenField';
document.getElementById("stBreak").setAttribute('className', 'hiddenField');
}
Note that stText existed in various places and there are various instances of similar javascript with this block of code, so failures in various places.
I found this as I manipulate an additional tx id field and the postcode fields depending on the selected country (which should be at the start of the form in my opinion), and this issue broke it.
Bookmarks