| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Variables for Contact Form Additional Fields | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Does anyone know how to construct the variable names for contact us form additional fields? I added a checkbox for people to check if they would like to receive our catalog. I want the subject line to be different when this box is checked so my attention will be drawn to the fact that the customer is requesting a catalog. To accomplish this, I am adding code such as this to the help_contactus_subj.tpl:
Code:
I know it's possible to make it work with default fields because I tried the following and it worked. Code:
I have tried all sorts of variations for the variable name and nothing works. The name in the source code of the contact us page for this input value is "additional_values[3]." This obviously isn't a necessity. I'm just so frustrated now I'm determined to make this work ![]() Thanks, Jill
__________________
X-Cart Gold 4.1.8 (Live) BCSE Shipping Estimator for FLC Mod BCSE Shipping Methods per Product Mod BCSE Customer Review Management Mod BCSE Catalog Order Form Mod X-Cart Gold 4.5.2 (Building/Testing) USA |
|||||||
#2
|
|||||||
|
|||||||
![]() try:
{if $additional_values[3].value ne ""} ok?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#3
|
|||||||
|
|||||||
![]() Thanks for trying carpeperdiem. It didn't work, though
![]() I tried the following and all flopped. Quote:
I guess I'll have to give up on this idea. When it first came to me, I thought it would be pretty simple. Silly me... Jill
__________________
X-Cart Gold 4.1.8 (Live) BCSE Shipping Estimator for FLC Mod BCSE Shipping Methods per Product Mod BCSE Customer Review Management Mod BCSE Catalog Order Form Mod X-Cart Gold 4.5.2 (Building/Testing) USA |
|||||||
#4
|
|||||||
|
|||||||
![]() Well, I had to change my tactics, but I've accomplished what I wanted with the following code in the help_contactus_subj.tpl file (see update below):
Quote:
The {$lng.eml_contact_us_subj} variable contains the text for every contactus email subject. The value of the{$lng.eml_contact_us_catalogreq_subj} variable is "- CATALOG REQUESTED." So the general subject is added first. Then the additional fields are looped through and the second language variable is added on if field 3 equals "Y." The only problem is that I have to remember to change the number 3 to something else if I delete or deactivate additional fields 1 and/or 2. Otherwise, it works as I wanted. I still can't figure out why there doesn't seem to be a logical variable name that would work. Even if fields 1 and/or 2 have null values, they are still looped through and their titles are included in the email generated. So #3 is always #3 regardless of the values of #1 and #2. Since the name of the input field in the contact form is "additional_values[3]," $additional_values[3] or $additional_values[3].value would seem like logical variable names. Alas, this is not the case, and variations of these don't work either. If anyone does figure out how to address these additional fields with variable names, I'd love to hear about it. For now, I'll settle for this solution. UPDATE: It hit me while I was brushing my teeth last night ![]() Quote:
with Quote:
Since fieldid is an auto-increment field, it will be 3 no matter what unless I re-install X-Cart or something (DUH!). I tested it with one of my first two additional fields deactivated and it works ![]() Jill
__________________
X-Cart Gold 4.1.8 (Live) BCSE Shipping Estimator for FLC Mod BCSE Shipping Methods per Product Mod BCSE Customer Review Management Mod BCSE Catalog Order Form Mod X-Cart Gold 4.5.2 (Building/Testing) USA Last edited by jillsybte : 10-19-2007 at 05:39 AM. Reason: Thought of better solution |
|||||||
|
|
|||
X-Cart forums © 2001-2020
|