I think this could be as simple as changing the name of your field from this:
Code:
<fieldset class="shipping">
<legend>Please enter the name of your preferred wholesaler/distributor:</legend>
<?php echo zen_draw_textarea_field('comments'); ?>
</fieldset>
To
Code:
<fieldset class="shipping">
<legend>Please enter the name of your preferred wholesaler/distributor:</legend>
<?php echo zen_draw_textarea_field('other_dist'); ?>
</fieldset>
Also this last bit is a little wrong
Code:
if (isset($_SESSION['comments'])) {
$comments = $_SESSION['comments'];
if (zen_not_null($_POST['other_dist'])) {
$_SESSION['other_dist'] = zen_db_prepare_input($_POST['other_dist']);
}
$other_dist = $_SESSION['other_dist'];
}
// process the selected shipping method
if ( isset($_POST['action']) && ($_POST['action'] == 'process') ) {
if (zen_not_null($_POST['comments'])) {
$_SESSION['comments'] = zen_db_prepare_input($_POST['comments']);
}
Change to
Code:
if (isset($_SESSION['comments'])) {
$comments = $_SESSION['comments'];
}
if (isset($_SESSION['other_dist'])) {
$other_dist = $_SESSION['other_dist'];
}
// process the selected shipping method
if ( isset($_POST['action']) && ($_POST['action'] == 'process') ) {
if (zen_not_null($_POST['comments'])) {
$_SESSION['comments'] = zen_db_prepare_input($_POST['comments']);
}
if (zen_not_null($_POST['other_dist'])) {
$_SESSION['other_dist'] = zen_db_prepare_input($_POST['other_dist']);
}
}
That should solve all your problems, but let us know how you get on.
Absolute
Bookmarks