Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009
    Posts
    63
    Plugin Contributions
    0

    Default zen_draw_input_fields change value to data from php variable

    Hey ho!
    I have a question, might be really simple but i can`t figure it out myself - i`m to much a php noob...

    I want to use the "tell a friend" script to let the users get in contact with the manufacturers of certain products - so i inserted a field in my database whichs holds the email address of the manufacturer. I can access the variable in the tell a friend form without problems. Now i want to put the email address from the variable to the value field of the input field from the form inputLabel" for="to-email-address">

    the zen_draw_input_fields function tells me that the value attribute is the second attribute to put between the '' in my tpl_tell_a_friend_default.php, i did it like so but unfortunately it isn working - maybe just some quotation issues:

    <label class="inputLabel" for="to-name"><?php echo FORM_FIELD_FRIEND_NAME; ?></label>
    <?php echo zen_draw_input_field('to_name', ''$manufacturersemail'', 'id="to-name"') . '&nbsp;<span class="alert">' . ENTRY_FIRST_NAME_TEXT . '</span>'; ?>
    if i use plain text instead of the variable $manufacturersemail the text is shown where it should - so the place where i put the value seems to be correct but hopefully it`s just a quotation issue like i said.

    Maybe someone can point me to the correct writing of this - would be really nice if someone could help me!

    Thanks a lot!
    zvenson
    www.acousticsdb.com - soundproofing and room acoustics matters | webdesign hamburg

  2. #2
    Join Date
    May 2009
    Posts
    63
    Plugin Contributions
    0

    Default Re: zen_draw_input_fields change value to data from php variable

    uups :)
    i figured it out - sorry for asking - but if anybody wants to do a thing like this the correct spelling would be:

    <?php echo zen_draw_input_field('to_name', ''.$manufacturersemail.'', 'id="to-name"') . '&nbsp;<span class="alert">' . ENTRY_FIRST_NAME_TEXT . '</span>'; ?>
    www.acousticsdb.com - soundproofing and room acoustics matters | webdesign hamburg

 

 

Similar Threads

  1. Replies: 1
    Last Post: 7 Sep 2016, 03:42 PM
  2. Replies: 20
    Last Post: 7 Dec 2014, 11:29 AM
  3. Replies: 1
    Last Post: 4 Feb 2011, 01:39 AM
  4. Using a PHP variable as an option value
    By dudemagma in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 23 Apr 2007, 10:17 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