ashamun Posted March 6, 2015 Share Posted March 6, 2015 Hey guys and gals, Hope everyone is doing well! I'm wondering if someone can help me with something. I have this piece of code: <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="main indent_2"><b><?php echo CATEGORY_COMPANY; ?></b></td> </tr> </table> <?php echo tep_draw_infoBox_top();?> <table border="0" cellspacing="4" cellpadding="2"> <tr> <td class="main b_width"><strong><?php echo ENTRY_COMPANY; ?></strong></td> <td class="main width2_100"><?php echo tep_draw_input_field('company') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td> </tr> <tr> <td class="main b_width"><strong><?php echo ENTRY_TAXID; ?></strong></td> <td class="main width2_100"><?php echo tep_draw_input_field('taxid') . ' ' . (tep_not_null(ENTRY_TAXID_TEXT) ? '<span class="inputRequirement">' . ENTRY_TAXID_TEXT . '</span>': ''); ?></td> </tr> <tr> <td class="main b_width"><strong><?php echo ENTRY_TAXISSUESTATE; ?></strong></td> <td class="main width2_100"><?php echo tep_draw_input_field('taxissuestate') . ' ' . (tep_not_null(ENTRY_TAXISSUESTATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_TAXISSUESTATE_TEXT . '</span>': ''); ?></td> </tr> </table> <?php echo tep_draw_infoBox_bottom();?> Can someone please tell me how to make the Tax ID field accept ONLY numbers? I have an issue with people writing "N/A" and I'm trying to stop that. Any help would be highly appreciated. Thanks in advance! Link to comment Share on other sites More sharing options...
ashamun Posted March 6, 2015 Author Share Posted March 6, 2015 This issue has been resolved. For those who need the solution, here it is. You can see the a "type" of "number" has been added to the fourth section of the "tep_draw_input_field". All thanks go to @@Tsimi for providing me with this solution. <tr> <td class="main b_width"><strong><?php echo ENTRY_TAXID; ?></strong></td> <td class="main width2_100"><?php echo tep_draw_input_field('taxid', '', '', 'number') . ' ' . (tep_not_null(ENTRY_TAXID_TEXT) ? '<span class="inputRequirement">' . ENTRY_TAXID_TEXT . '</span>': ''); ?></td> </tr> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.