clueless_in_berlin:
If one required field is missing when creating a new account, all of the entered fields are deleted and a new page is opened with a message such as: Please choose a salutation.
This, I find to be extremely annoying. I was wondering if anyone knows how to arrange it so that all of the entered fields remain as they have already been entered.
Can anyone help me here? Thanks in advance.
Version 1.3.8a German and English
That's because the input fields do not contain the variables for the information being input:
You can see this from the line of code below (the highlighted portion)
<?php echo zen_draw_input_field('firstname', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_firstname', '40') . ' id="firstname"') . (zen_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="alert">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>
What you need is the following:
<?php echo zen_draw_input_field('firstname', $firstname, zen_set_field_length(TABLE_CUSTOMERS, 'customers_firstname', '40') . ' id="firstname"') . (zen_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="alert">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>
This now contains the variable for the first name and will hold that information whatever it is.
What you'll need to do is open includes/templates/template_default/tpl_modules_create_account.php
and add the variables for each and every input field (similar to the above)
NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.