sonictrip.net Posted August 14, 2004 Share Posted August 14, 2004 Hi all, im trying to add in a question to the 'Register' page that asks: "What days of the week do you buy the Irish Times?" The answers will be all the days of the week, but you have to be able to select more than one option. Does anyone know of a mod that deals with stuff like this or would i need to add more fields etc. to the database? Whats the best and quickest way to do this? Thanks! Link to comment Share on other sites More sharing options...
sonictrip.net Posted August 19, 2004 Author Share Posted August 19, 2004 <?php echo CATEGORY_SURVEY; ?></td> </tr> <tr> <td class="formAreaTitle"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main"><?php echo IRISH_TIMES; ?></td> </tr> <tr> <td class="main"><?php if ($is_read_only == true) { echo ($account['gender'] == 'm') ? MALE : FEMALE; } elseif ($error == true) { if ($entry_days_error == true) { echo tep_draw_checkbox_field('customers_monday ', 'm', $monday) . ' ' . MONDAY . ' ' . tep_draw_checkbox_field('customers_tuesday', 't', $tuesday) . ' ' . TUESDAY . ' ' . tep_draw_checkbox_field('customers_wednesday', 'w', $wednesday) . ' ' . WEDNESDAY . ' ' . tep_draw_checkbox_field('customers_thursday', 'th', $thursday) . ' ' . THURSDAY . ' ' . tep_draw_checkbox_field('customers_friday', 'f', $friday) . ' ' . FRIDAY . ' ' . tep_draw_checkbox_field('customers_saturday', 's', $saturday) . ' ' . SATURDAY . ' ' . tep_draw_checkbox_field('customers_everyday', 'e', $everyday) . ' ' . EVERYDAY . ' '. ENTRY_DAYS_ERROR; } else { echo ($gender == 'm') ? MALE : FEMALE; echo tep_draw_hidden_field('day_choices'); } } else { echo tep_draw_checkbox_field('customers_monday ', 'm', $monday) . ' ' . MONDAY . ' ' . tep_draw_checkbox_field('customers_tuesday', 't', $tuesday) . ' ' . TUESDAY . ' ' . tep_draw_checkbox_field('customers_wednesday', 'w', $wednesday) . ' ' . WEDNESDAY . ' ' . tep_draw_checkbox_field('customers_thursday', 'th', $thursday) . ' ' . THURSDAY . ' ' . tep_draw_checkbox_field('customers_friday', 'f', $friday) . ' ' . FRIDAY . ' ' . tep_draw_checkbox_field('customers_saturday', 's', $saturday) . ' ' . SATURDAY . ' ' . tep_draw_checkbox_field('customers_everyday', 'e', $everyday) . ' ' . EVERYDAY . ' '. ENTRY_DAYS_TEXT; } ?> Here is some code that i copied and changed around a little bit, although the original code was a question saying "What gender are you? Male or Female" so there were only 2 options with radio buttons. What i need to do is have the 7 checkboxes referencing the seven different fieldnames on my database at customers_monday through to customers_friday and also customers_everyday. There's no need for validation coz they are checkboxes and there's no right or wrong answer. Can someone please point me in the right direction? I don't know any php code and only got into it all last year with OsCommerce. Installing mods is one thing but writing this stuff from scratch is damn hard... Try this link to see whats happeing at the moment with the form: https://www.secure-ssl-server.org/markettow...ate_account.php Thanks for any help! :unsure: Link to comment Share on other sites More sharing options...
sonictrip.net Posted August 31, 2004 Author Share Posted August 31, 2004 My client is willing to pay for this code to be written so if you can do it, let me know and send me a quote for it... He needs it asap, so the sooner the better! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.