Backend Product form textarea field

  • Posts: 79
  • Thank you received: 2
4 years 10 months ago #317938

-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.18

I have a question about the backend form for products (form.php).
I have a field that is of the type textarea. I have put it in as follows:

<dl id="hikashop_product_eigenschappen" class="hika_options">
      <dt class="hikashop_product_eigenschappen"><label>Eigenschappen</label></dt>
	<dd class="hikashop_product_eigenschappen">
	<textarea id="product_eigenschappen" style="width:100%" cols="35" rows="2" name="data[product][eigenschappen]"><?php echo $this->product->eigenschappen; ?></textarea>
	</dd>
</dl>	

Now this will show it as just a textarea. My question is how can i show the textarea with the WYSIWYG editor and that it will also safe the content.
Any help would be appreciated.
Thanks,
Rogier

Last edit: 4 years 10 months ago by rkuiper.

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 10 months ago #317943

Hi,

Why not create a custom field of the table "product" and of the type "wysiwyg" ?
That would display a HTML editor on the product edition page automatically for you.
With custom coding, it's not that easy to include a HTML editor.
You have such code:
stackoverflow.com/questions/9585595/joom...esnt-load-the-editor
But then you need extra coding for the variants, handling different type of editors, etc).
I would recommend to use just a custom field instead of trying to use your own code.

The following user(s) said Thank You: rkuiper

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

  • Posts: 79
  • Thank you received: 2
4 years 10 months ago #318210

Hi Nicolas,
Apologies for the late response. I got it too work.
I understand what you are saying. What i did was make a single block for json informatie. So i moved fields around. Otherwise they are all in one column and this way easier to seperate the json fields from the custom fields for the shop.

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

Time to create page: 0.036 seconds
Powered by Kunena Forum