♥peterpil19 Posted October 29, 2017 Share Posted October 29, 2017 Hi, Hopefully this should be a very simple question. In categories.php, can someone show me how to change the dimensions of the text input fields? I specifically want multiple lines of entry in a field. For my purposes a single line is insufficient for some of the product fields and is making entering new products a little more difficult than it ought to be. Here is the code for a typical product field input field. In this case for "model". I can change the length, by changing 15 to some other number. But I cannot change the size vertically (i.e. to allow multiple lines to display). <tr> <td class="main"><?php echo TEXT_PRODUCTS_MODEL; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_model', $pInfo->products_model); ?></td> </tr> I notice that products_description uses a different type of field (larger, multiple lines of data - and the size can be changed) but I cannot seem to replicate it. If I copy the below and change the reference to "description" to e.g. "model" it works fine when adding a new product, but then the fields dissapear when going back into the product. So I must be doing something wrong. <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?> <tr> <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td> <td><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" valign="top"><?php echo tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']); ?> </td> <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (empty($pInfo->products_id) ? '' : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> </tr> </table></td> </tr> <?php } ?> I am grateful if someone could point me in the right direction. I have tried searching online but had no success. Peter CE PHOENIX SUPPORTER Support the Project, go PRO and get access to certified add ons Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design. Download the latest version of CE Phoenix from gitHub here Link to comment Share on other sites More sharing options...
241 Posted October 29, 2017 Share Posted October 29, 2017 you are going in the right direction using the products_description textarea as input field type, however you will need to make changes to the database for that field products_description uses type text in the database whereas model uses varchar (12) with the 12 being the max number of characters for a simple model change <tr> <td class="main"><?php echo TEXT_PRODUCTS_MODEL; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_model', $pInfo->products_model); ?></td> </tr> change the tep_draw_input field <tr> <td class="main"><?php echo TEXT_PRODUCTS_MODEL; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_textarea_field('products_model', 'soft', '70', '15', $pInfo->products_model); ?></td> </tr> you can change or remove the tep_draw_separator('pixel_trans.gif', '24', '15') No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
♥peterpil19 Posted October 29, 2017 Author Share Posted October 29, 2017 Thanks @241! That works! Can I kindly trouble you with one follow up question? How do I specify the dimensions of the input text area field? Peter CE PHOENIX SUPPORTER Support the Project, go PRO and get access to certified add ons Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design. Download the latest version of CE Phoenix from gitHub here Link to comment Share on other sites More sharing options...
♥peterpil19 Posted October 29, 2017 Author Share Posted October 29, 2017 Sorry, Ignore that last post, the answer was (embarrassingly) obvious... Thank you again for your assistance! Peter CE PHOENIX SUPPORTER Support the Project, go PRO and get access to certified add ons Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design. Download the latest version of CE Phoenix from gitHub here Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.