I think that I'm a half inch away from getting this right! I used the email format but since that is a radio button dependent on a config setting to start with, maybe I've got stuff I don't need here. (this may well show my php ignorance - I hate to have to ask!)
Here's the button from the tpl_modules_create_account.php:
<?php echo zen_draw_radio_field('customers_resident', 'Yes', ($customers_resident == 'yes' ? true : false),'id="resident_yes"') . '<label class="radioButtonLabel" for="resident_yes">' . ENTRY_SEND_DOC_YES . '</label>' . zen_draw_radio_field('customers_resident', 'NO', ($customers_resident == 'No' ? true : false), 'id="resident_no"') . '<label class="radioButtonLabel" for="resident_no">' . ENTRY_SEND_DOC_NO. '</label>'; ?>
I also tried leaving out the ($customers_resident == 'yes' ? true : false) on both buttons like this:
<?php echo zen_draw_input_field('customers_resident', htmlspecialchars($cInfo->customers_resident, ENT_COMPAT, CHARSET, TRUE), zen_set_field_length(TABLE_CUSTOMERS, 'customers_resident', 50), true) ; ?>
and from the module create account just this since it's not dependent on a config setting like the email format:
$customers_resident = zen_db_prepare_input($_POST['customers_resident']);
and added to the data array:
'customers_resident' => $customers_resident,
I've added in quite a few new fields and everything works except the radio buttons (I have three sets of them). Nothing is getting put into the database but not even the defaults are left. So it looks like nothing is being posted from the create account form - ie, radio buttons aren't working!


Reply With Quote
