Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Nov 2006
    Posts
    55
    Plugin Contributions
    0

    Default How to add labels to new fields

    I'm adding new fields to the checkout page. With a combo of instructions from various posts, I'm half way there.

    I'm using the following to create the text box:
    <?php echo zen_draw_input_field('NEW_LAUDER_FIELD'); ?>
    That works, I can make lots of text boxes/input fields.

    I found where to define NEW_LAUDER_FIELD In the: [COLOR=Red]/includes/templates/custom/templates/checkout_shipping.php

    This is how I defined it:
    define('NEW_LAUDER_FIELD', 'New Lauder Field');

    Next I need to put the label for the text box/input field next to it (so people know what info to enter into the text box/field.)

    I found this code:
    <label class="inputLabel" for="firstname"><?php echo ENTRY_FIRST_NAME; ?></label>
    <?php echo zen_draw_input_field('firstname'); ?>

    When I use the code above a text box/input field with the label First Name appears next to it. That is good.

    So I can figure out where ENTRY_FIRST_NAME is defined (includes/languages/custom/english.php), but I don't know where "firstname" (lower case, no spaces) is defined. This seems to be key to creating my label for the box.

    I've duplicated the whole thing that works with firstname and replaced 'firstname' with the NEW_LAUDER_FIELD info like so:
    <label class="inputLabel" for="newlauderfield"><?php echo NEW_LAUDER_FIELD; ?></label>
    <?php echo zen_draw_input_field('newlauderfield'); ?>


    But what I get is
    NEW_LAUDER_FIELD [ empty field box ]

    I want it to be:
    New Lauder Field [ empty field box ]
    as defined in checkout_shipping.php

    I don't know where 'newlauderfield' is supposed to come from or where it is defined, or if that is even right. I think this is the key to my problem.



    I know I went a little overboard on the description, but I wanted to be real clear. I hope I didn't make it more confusing in the process!

    It seems like I'm missing something VERY simple.

    Thanks for any help you can give!
    Kathy
    Last edited by kappaluppa; 1 Feb 2007 at 11:12 AM. Reason: fix formatting

 

 

Similar Threads

  1. How To Add New Product Fields?
    By webego in forum Setting Up Categories, Products, Attributes
    Replies: 158
    Last Post: 18 Oct 2019, 04:19 PM
  2. How to add new fields?
    By chandroo007 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 1 Jun 2010, 03:13 PM
  3. How do I add new form fields on the registration page?
    By RawKarat in forum General Questions
    Replies: 1
    Last Post: 13 Dec 2009, 10:49 PM
  4. How To Add New Fields to Invoice?
    By PudzPud in forum Basic Configuration
    Replies: 7
    Last Post: 15 Nov 2009, 03:50 PM
  5. How i can add new data fields to a Product
    By shreesoft in forum Customization from the Admin
    Replies: 4
    Last Post: 2 Oct 2006, 03:10 AM

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