Keyword

Customize form - Problem with multiple Select!

  • Andrew Kuhn
  • Andrew Kuhn's Avatar Topic Author
  • Offline
  • New Member
More
14 years 2 weeks ago #87903 by Andrew Kuhn
Hello, i'm customizing the k2 form, and i need a little help.So, when i want to add a input field, i add:<input type="text" name="FIELDNAME" size="30" class="text_area" value="<?php echo $this->row->FIELDNAME; ?>" />To admin\com_k2\views\item\tmpl\default.phpand var $FIELDNAME = null;to admin\com_k2\tables\k2item.phpSo, until now, everything is ok.But, i'm trying to add a select field with multiple options.Basically:on default.php    <select id="FIELDNAME" name="FIELDNAME" multiple="multiple" size="5">        <option SELECTED value="1">OPTION1</option>;        <option value="2">OPTION2</option>';        <option value="3">OPTION3</option>';        <option value="4">OPTION4</option>';    </select>And in k2item.phpvar $FIELDNAME = null;But they only save 1 Option ( like "2"), and i want to save all selections (like "1,4");Anyone know how to do that?Thanks, Andrew

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum