Zen Cart Logo
Forums / General Questions / How do I add VALUE to TEXTAREA ?

How do I add VALUE to TEXTAREA ?

Locked

Views: 1,691

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
20 Aug 2008, 3:57 AM
#1
bugyoutoo avatar

bugyoutoo

New Zenner

Join Date:
Nov 2007
Posts:
34
Plugin Contributions:
0

How do I add VALUE to TEXTAREA ?

Hi everybody.

I have a text area on my orderform. Inside this text area I would like there to be some text added automatically.

I have added a text area in the OPTION NAME MANAGER

For some reason I can not find an option to add values to the text area under OPTION VALUE MANAGER.

Then I tried adding the value manually by editing the /includes/modules/attributes.php file, close to line 386, but failed because I am unsure about the syntax.

Any ideas on how to solve this ?

22 Aug 2008, 1:19 AM
#2
bugyoutoo avatar

bugyoutoo

New Zenner

Join Date:
Nov 2007
Posts:
34
Plugin Contributions:
0

Re: How do I add VALUE to TEXTAREA ?

Original poster here. Doing a bump.

So the problem is still that I need to add some text to a textarea on my orderform.

I've checked out line 386 of the /includes/modules/attributes.php file. It looks like this:

<textarea class="attribsTextarea" name="id[' . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ']" rows="' . $products_options_names->fields['products_options_rows'] . '" cols="' . $products_options_names->fields['products_options_size'] . '" onkeydown="characterCount(this.form[\'' . 'id[' . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ']\'],this.form.' . TEXT_REMAINING . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ',' . $products_options_names->fields['products_options_length'] . ');" onkeyup="characterCount(this.form[\'' . 'id[' . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ']\'],this.form.' . TEXT_REMAINING . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ',' . $products_options_names->fields['products_options_length'] . ');" id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '" >' . stripslashes($tmp_value) .'</textarea>

Now if i try to add something like this:
value="' . this is some text . '"
within this textarea I will not see any text as I had hoped for. But I don't really know the syntax... Does anybody else have a clue how I should write the value= thing to this textarea to make it work ?

:lamo:

22 Aug 2008, 2:16 AM
#3
bugyoutoo avatar

bugyoutoo

New Zenner

Join Date:
Nov 2007
Posts:
34
Plugin Contributions:
0

Re: How do I add VALUE to TEXTAREA ?

Original poster here again.

I know now I have to add the text just before the finishing </textarea>, and not on line 387, but on line 401. Seems like one can only add value= to forms in pure html or something..

The solution wasn't so pretty though. I think I might aim for a workaround...