Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2009
    Posts
    55
    Plugin Contributions
    0

    Default pre filled text area

    Hi all,

    I am trying to pre fill a text area box with info to assist the customer with what to put in there. The idea being similar to a drop down box which might by default say "please make a selection". The text box in question is on "delivery info" page 1 of 3 on checkout, the file I've accessed is tpl_checkout_shipping_default.php line 126. Not sure if this possible, has anyone tried to do this before?

  2. #2
    Join Date
    Oct 2009
    Location
    Netherlands - NB
    Posts
    146
    Plugin Contributions
    0

    Default Re: pre filled text area

    Quote Originally Posted by flashy275 View Post
    Hi all,

    I am trying to pre fill a text area box with info to assist the customer with what to put in there. The idea being similar to a drop down box which might by default say "please make a selection". The text box in question is on "delivery info" page 1 of 3 on checkout, the file I've accessed is tpl_checkout_shipping_default.php line 126. Not sure if this possible, has anyone tried to do this before?
    I am not sure if I get you right, but I guess you should add a simple html text area in your tpl file.

    Like this:

    <TEXTAREA NAME="comments" COLS=40 ROWS=6>
    John said
    : I think it's a great idea
    : but it needs more thought
    </TEXTAREA>TEXTAREA>

    you can also include a value="your text"/> in it.

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: pre filled text area

    NOTE: if you go to the Option Name Manager and EDIT the Option Name, there is a Comment area that you can use ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: pre filled text area

    Quote Originally Posted by flashy275 View Post
    Hi all,

    I am trying to pre fill a text area box with info to assist the customer with what to put in there. The idea being similar to a drop down box which might by default say "please make a selection". The text box in question is on "delivery info" page 1 of 3 on checkout, the file I've accessed is tpl_checkout_shipping_default.php line 126. Not sure if this possible, has anyone tried to do this before?
    Here is the line of code you are referring to: You can add the highlighted portion to pre fill the comment box.

    Code:
    <?php echo zen_draw_textarea_field('comments', '45', '3', 'You may add any comments about your order here'); ?>

  5. #5
    Join Date
    Sep 2009
    Posts
    55
    Plugin Contributions
    0

    Default Re: pre filled text area

    great help thanks,

    jcdk pointed me in the right direction and after playing around a little from there I produced the required result exactly as Clyde suggested.

    thanks again

  6. #6
    Join Date
    Jan 2010
    Posts
    9
    Plugin Contributions
    0

    help question Re: pre filled text area

    Hi,
    I've come across a similar scenario and will try explain as easily as possible. In the attributes section, the text option allows the custmer to enter some custom text to their order. i would like to prefill this with a bit of text to give customers an idea of what to put in here. I know to edit option names and comments and use multiple lines, but i just cant seem to add in a bit of text in this blank area, with the text disappearing when they click to type in their own text. This is Zen Cart, i'm surprised to have not been able to find this in the forum. To give you an idea, when you want to reply to a message on this thread, their is text in the box already saying 'Please click...." Anybody?

  7. #7
    Join Date
    Jan 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: pre filled text area in attributes

    Quote Originally Posted by colinvic View Post
    Hi,
    I've come across a similar scenario and will try explain as easily as possible. In the attributes section, the text option allows the custmer to enter some custom text to their order. i would like to prefill this with a bit of text to give customers an idea of what to put in here. I know to edit option names and comments and use multiple lines, but i just cant seem to add in a bit of text in this blank area, with the text disappearing when they click to type in their own text. This is Zen Cart, i'm surprised to have not been able to find this in the forum. To give you an idea, when you want to reply to a message on this thread, their is text in the box already saying 'Please click...." Anybody?
    The threads in this section are very helpful as far as i should be able to work out how to do it, but does anyone know the file i should be looking at? cheers

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: pre filled text area

    Could you give an example of what you need to pre-populate the comment with?

    If you were to do a search in the Tools ... Developers Tool Kit ... on a portion of the line that clydejones post in the bottom input box for:
    zen_draw_textarea_field('comments'
    You will find it is referenced in a few files, the first one in the checkout being:
    /includes/templates/template_default/templates/tpl_checkout_shipping_default.php

    Line #136 : <?php echo zen_draw_textarea_field('comments', '45', '3'); ?>
    The extra paramater added to the code would default it to the text to be added to this line ...

    NOTE: you should use your templates and overrides directory for these changes ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Jan 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: pre filled text area

    Quote Originally Posted by Ajeh View Post
    Could you give an example of what you need to pre-populate the comment with?

    If you were to do a search in the Tools ... Developers Tool Kit ... on a portion of the line that clydejones post in the bottom input box for:


    You will find it is referenced in a few files, the first one in the checkout being:


    The extra paramater added to the code would default it to the text to be added to this line ...

    NOTE: you should use your templates and overrides directory for these changes ...

    I have attached a link to better explain. In the Engraving attribute i would like it (in the cuurently blank space) to be prefilled to say what i have listed in the Example underneath it. When they click there to type the example text disappears. Is this possible? Direct Link below. Thanks

    http://www.moderntrophies.com.au/ind...roducts_id=234

 

 

Similar Threads

  1. Email a pre-filled shopping cart link?
    By DannyVarley in forum General Questions
    Replies: 19
    Last Post: 17 Oct 2012, 04:51 PM
  2. pre filled review text in Lightinthebox template
    By coolwolf in forum General Questions
    Replies: 4
    Last Post: 1 Feb 2012, 01:47 PM
  3. v139h How to remove pre-filled email address on Contact Us form?
    By jostar in forum General Questions
    Replies: 23
    Last Post: 24 Jan 2012, 06:38 PM
  4. Pre-Filled Password
    By KThompson in forum General Questions
    Replies: 4
    Last Post: 6 Oct 2007, 06:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR