• Amanda Byrne- Carolina Tiger Rescue
  • NEWBIE
  • 110 Points
  • Member since 2012


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 33
    Questions
  • 53
    Replies
Modifying some existing code that updates a record and then redirects to a new page. I need to change it so that it runs a query to identify the correct record to update, and then updates the record.
 
public PageReference saveAttendee(){
     
         List<CnP_PaaS_EVT__Event_attendee_session__c> attendee = [SELECT Id, Name, DTCI_Agreement_Active__c, CnP_PaaS_EVT__First_name__c, CnP_PaaS_EVT__Last_name__c, DTCI_Ticket_Level__c, CnP_PaaS_EVT__EventId__r.CnP_PaaS_EVT__category__r.name                                                                                                                                                          
                                                                       FROM CnP_PaaS_EVT__Event_attendee_session__c                                                                            
                                                                       WHERE CnP_PaaS_EVT__Registrant_session_Id__c =:registrantId 
                                                                            AND DTCI_Ticket_Level__c =: ticketLevel           
                                                                            AND DTCI_Attendee_Info_Assigned__c = FALSE
                                                                       ORDER BY DTCI_Ticket_Order__c
                                                                       LIMIT 1
                                                                      ];
        
        attendeeId = attendee.Id;                                                              
        attendeeFirstName = attendee.CnP_PaaS_EVT__First_name__c;
        attendeeLastName = attendee.CnP_PaaS_EVT__Last_name__c;
        mailingCity = attendee.DTCI_Mailing_City__c;
        mailingCountry = attendee.DTCI_Mailing_Country__c;
        mailingCounty = attendee.DTCI_Mailing_County__c;
        mailingState = attendee.DTCI_Mailing_State__c;
        mailingStreet = attendee.DTCI_Mailing_Street__c;
        mailingZip = attendee.DTCI_Mailing_ZIP_Postal_Code__c;
       
                                   
        update attendee;                                        
        
PageReference sendToReleaseForm = new PageReference('/apex/DTCI_Release_Form_Page_AB' + '?attendeePageId=' + attendee.id + '&registrantPageId=' + registrantId + '&eventPageId=' + eventId + '&releasePageType=' + attendee.DTCI_Release_Type__c);  
        sendToReleaseForm.setRedirect(true);                        
        return sendToReleaseForm;     
    }

How can I query the object to find the next suitable record to update and still create the PageReference I need to move forward?

 
I had massive issues trying to log on at  #DF15 DevZone. I want to start some Trailheads, but I'd really like to get the achievements attached to the personal dev account I set up on my gmail for my cert rather than my work email account. But I'm locked out now and I'm advised to contact my Admin- no idea who that would be,that's always been me! I've tried resetting the password, how can I get unlocked?
I have a form that is collecting address and Contact information from a group of people. Once the group has completed- I want to use a workflow to start a visual flow. The visual flow's purpose is just to standardize the data input- so it changes fields to proper case and standardizes abbreviations.

But I want all this to happen in the background. I've got my loop set and ready to go, but I'm not really sure how to end it. The flow has no screens- it's just background cleanp. How do I end the loop? Just use an assignment or a step?
We are launching a Tour Check-In app so guests may check in at a kiosk when they arrive.

The form makes use of the Attendee object that is part of our ticketing app. We do not collect attendee information in advance- the ticketing app creates Attendee records for each attendee with the ticket-purchaser's name at the time of ticket purchase.

Our custom app has a form to collect the attendee's information (they are agreeing to a legal release- so we need their mailing address). The form fields are blank when the guest goes to check in, except for the First Name and Last Name, which are populated with the purchaser's name

We'd prefer the fields were blank- I'm concerned that it would be too tempting not to bother modifying the name fields. Is there a way I can modify the code so that these fields are not prepopulated on the form?

Page Code
<detail>First Name<font class='detailError'>*</font></detail>

<apex:inputField value="{!CnP_PaaS_EVT__Event_attendee_session__c.CnP_PaaS_EVT__First_name__c}" required="true" styleClass="detail" id="firstNameField" >
                
     <apex:param name="attendeeFirstNameParam" value="{!CnP_PaaS_EVT__Event_attendee_session__c.CnP_PaaS_EVT__First_name__c}" assignTo="{!attendeeFirstName}"/>            
 </apex:inputField>

Constructor Code:
//Constructor
    public DTCI_Attendee_AB_Ctrl(ApexPages.StandardController controller) {         
        attendee = (CnP_PaaS_EVT__Event_attendee_session__c) controller.getRecord();         
        eventId = ApexPages.currentPage().getParameters().get('eventPageId');
        registrantId = ApexPages.currentPage().getParameters().get('registrantPageId');        
    }

Thanks in advance! Amanda
I'm trying to finish up an app created for Salesforce1. The app inludes a getFeedback survey- which works by an output link button that sends the user to the survey. Once the user has completed the survey, I would like them to return to a confirmation page that tells them they are done.

I initially tried putting the survey in an iframe, but couldn't get out of the iframe once in it. Instead, I set the redirect feature of the survey to go to the confirmation page with all the necessary parameters. I'm limited is how I can use that redirect, since I can only define it with the URL in the survey administration. This plan worked great on my pc- the user could progress through the app, continue through the survey, and return to the app all within the same window.

But in Salesforce1, when my output link goes to the survey, it opens in a new browser window kind-of 'within' Salesforce1, so at the end of the survey, the user goes to the correct VF page- but it's in the new window launched by the survey, and the old window is still underneath.
The external link opening in a new window is an intentional feature of Salesforce1- but I need to create a way to close that window and redirect to the correct page in the parent window at the end of the survey.

Here's the code I'm currently using for the button to go to the quiz.
 
<apex:outputLink id="postTourQuizButton" styleClass="btn"
 value="https://www.getfeedback.com/r/{!surveyid}?CnP_PaaS_EVT__Event_attendee_session__c={!selectedAttendeeButtonId}">
   What did you Learn about Wildcats? 
</apex:outputLink>



 




 
Working on a ticket check-in Salesforce1 app. My relevant page code is:
<apex:inputField required="true" styleClass="detail" id="agreementField" value="{!Release_Form__c.DTCI_Agreement__c}">                                    
                <apex:param name="Type" value="{!Release_Form__c.DTCI_Agreement__c}" assignTo="{!agreement}"/>                            
            </apex:inputField>                       
            <br/>                           
            <apex:commandButton styleClass="btn" action="{!saveRelease}" value="Submit" title="Submit" immediate="false" />            
            <br/>

This works great in my sandbox if I'm on my PC, I cannot click the Submit button without checking the box, and if I try to do so, I get the appropriate error message. However, in our demo, we discovered that in Salesforce1, the user could submit and move on without checking the box.

Does anyone know why this might be happening and what workaround I could create? (I'm pretty rough at Javascipt, so if the workaround is Javascript, extra syntax would be awesome)

I can't imagine that this issue is by design.

 
 
 
I've been staring and comparing it with successul code for several hours, and I'm stumped- why won't ?

I've tried it inside functions, adding an alert so I'd know the function was called, I've tried cutting down the string to something really short that was just plain text and that's not it.

I tried putting it into a request from the controller, and that DID work,but it seems silly to call the controller when I don't need anything from it, but it does make me think it is an order of operations thing. But I'm not a programmer, and the things I've tried to issue some kind of refresh/get/run haven't worked

<script>
 $j=jQuery.noConflict();

        $j("#preTourQuizButton").append(
             "<a class=\"btnOrange\" href=\""
             + "https://www.getfeedback.com/r/" +surveyid + "?CnP_PaaS_EVT__Event_attendee_session__c.id=" + attendeeJsId + "&attendeePageId=" + attendeeJsId + "&registrantPageId=" + registrantJsId + "&eventPageId=" + eventJsId 
             + "\">"                                                          
             +"What do you Know about Wildcats?" 
             + "</a>"                                                                                                                  
          );
</script>

In page:

<div class="detail" id="preTourQuizButton"> 
            <!--preTour Quiz Button will populate here--> 
</div>
I wanted to spruce up the text on a commandButton by applying more than one CSS font class on the button label, but I get errors when I use tags inside the value parameter

Page Code:
<apex:commandButton styleClass="btnOrange" action="{!postTourQuizLink}"
value="What did you <font class='Papyrus'>Learn</font> about <font class='Papyrus'>Wildcats</font>? <font class='Afrika'>\</font>"
title="Take the post-Tour Quiz" immediate="false" />

I've also tried removing the value param and putting the label text between tags: <apex:commandButton>Label</apex.commandButton>

I tried creating a variable quizButtonTxt inside the postTourQuizLink function (on the extension ctrl) and then putting value="{!quizButtonTxt}", also not helpful. 

I'm a SF Admin/code hacker-modifier, and so I don't know enough to come up with a workaround- any suggestions? Special character references?

 
I am trying to modify some VF code to use the field's default value as the default value on the page

Ctrl Code
 
public String mailingCountry {get; set;}

public PageReference saveAttendee(){
mailingCountry = attendee.DTCI_Mailing_Country__c;
}
 
VF Page Code
<detail>Mailing Country<font class='detailError'>*</font></detail>
<apex:inputField value="{!CnP_PaaS_EVT__Event_attendee_session__c.DTCI_Mailing_Country__c}" required="true" styleClass="detail" id="mailingCountryField" >                                        
<apex:param name="attendeeMailingCountryParam" value="{!CnP_PaaS_EVT__Event_attendee_session__c.DTCI_Mailing_Country__c}" assignTo="{!mailingCountry}"/>                                
 </apex:inputField>

The page displays all the appropriate values but does not set the default value to the field's default.  It's set to --None--

how do I set the default value for the page to the field's default value?

gratefully, A                 
I'm working on a visual force page for a mobile app

Code from Controller (summarized to relevant parts):
global with sharing class DTCI_Remote_Methods_Ctrl {   
    public String attendeeId {get; set;}         
                           
    public DTCI_Remote_Methods_Ctrl (ApexPages.StandardSetController controller) {
        attendeeId = ApexPages.currentPage().getParameters().get('attendeePageId');          
    }


 @RemoteAction
        //Get attendee specified by attendeeId
        global static List<CnP_PaaS_EVT__Event_attendee_session__c> getconfirmedAttendee(string attendeeId){
           
            List<CnP_PaaS_EVT__Event_attendee_session__c> confirmedAttendee = [SELECT Id, Name, CnP_PaaS_EVT__First_name__c, CnP_PaaS_EVT__Last_name__c                                                                                                               
                                                                       FROM CnP_PaaS_EVT__Event_attendee_session__c                                                                            
                                                                       WHERE Id = :attendeeId       
                                                                           AND DTCI_Agreement_Active__c = TRUE
                                                                       ORDER BY Name                                                                                    
                                                                      ];
            return confirmedAttendee;                                
        }

Code from VF Page (summarized):

<apex:page standardController="CnP_PaaS_EVT__Event_attendee_session__c" extensions="DTCI_Remote_Methods_Ctrl" recordSetVar="attendees"
           docType="html-5.0" standardStylesheets="false" showheader="false" sidebar="false">

<script>    
    $j=jQuery.noConflict();  
    var attendeeJsId = '{!$CurrentPage.Parameters.attendeePageId}';

   DTCI_Remote_Methods_Ctrl.getconfirmedAttendee(attendeeJsId, function(result,event){
        if(result.length === 0){
            $j("#confirmedAttendeeId").append("No results<br />");
        }else 
                              
            $j("#confirmedAttendeeId").append("<title1>" + result.Name + "has checked in</title1>" + "<br/><br/>" );                                                                                                                                                                                                                                                                                
        
                    
    }, {escape:true});

Everything works great on the page with the exception of returning the value of result.Name, it simply says 'undefined'.

I think I just need a little syntax tweak, but for the life of me can't figure it out!

assistance much appreciated, Amanda 
I have a Payments object, and on that Payments Object I have formula fields that calculate how many calendar years ago and fiscal years ago the payment was made.  I needed the values to roll up to the Opportunity, but rollups don't work with formula fields- so I created currency fields to hold the values for the rollup.

But I can't seem to set the default value on those currency fields to a formula field in the same object.  I can't create a workflow that runs on January 1 and July 1.  Doing a manual mass update twice a year isn't the worst scenario in the world, but If I need to run a report with the correct rollup values and I don't notice they are incorrect- my report is wrong.  Or if I do notice, then I have to reack down why the value isn't right.

Any ideas to automate the process to copy the calues from the formula field to the currency field on a particular date?
I am using a third party app to manage Events, and another 3rd party app by the same company (Click&Pledge) for payment processing.  The two apps functionally work together, but there are some key downsides- one being that there is nothing actually connecting the ticket purchase record in the Events app with the Opportunity that the Payment processing app creates.

There is one field, the Transaction Order ID, that contains the same value in both apps and in Salesforce, but is not actually a master-child or lookup relationship. In Opportunities, it's a lookup field to the Transaction custom object (part of the payment processing) called C&P Order Number, in the Events app is just a text field on the "Registrant" object called Transaction Order Number.

I need to create a report that shows all the Opportunities for the Event (the event is recorded as a lookup on the Registrant object). Is there a way I could create a custom lookup field to connect the registrant with the Opportunity? (this would be a 1:many, because each ticket becomes a separate opportunity, so if a registrant buys 4 tickets, there's 4 Opportunities.) Maybe set the default value as a formula field to pull the value from the Transaction Order Number text field?
I have two objects whose values I would like to include in the same report, but they don't have any relationship already created.  However, they do both have an order number text field that represents the same value 1:1

I tried to create a custom lookup and populate if with a workflow, but can't figure out how to make it work.

I found some reference that indicated this might be doable with the Process Builder, but I haven't tackled the Process Builder before.  Is there any other option?
I am creating a flow that has uses a FastLookup to create an sObject Collection, and then loops through that collection, updating an sObj variable- with the goal of creating records.  Currently, rather than creating a record for each loop iteration, I have a screen displaying the values I intend to write to the record- so I can verify it's going to work properly.

Three times now I have used an id field in the display text, and when I save as a new version and go back into the flow to do more work, the field has changed from {!vareachtemplatetodiscount.cnp_paas_evt__category__c} to {!vareachtemplatetodiscount.cnp_paas_evt__category__r} , and throws an error the next time I save a new version.

I change it back to __c, but there's no telling if it will happen again the next version or two.

What could be causing that?

 
I'm trying to create a custom button that pre-populates an Opportunity with certain values.  I'd like to have the button go straight to the new opportunity screen, and bypass the Record Type selection screen.

I've poured through quite a few posts, and the advice is always add"&RecordType=RecordType.Id", but I already have that in the URL, and it doesn't seem to help.

URL I'm using:
/setup/ui/recordtypeselect.jsp?
ent=Opportunity
&RecordType=012A0000000r2ROIAY
&retURL=%2F{!Contact.Id}
&save_new_url=%2F006%2Fe%3Flookupcmpgn%3D1%26retURL%3D%252F{!Contact.Id}%26accid%3D{!Account.Id}%26conid%3D{!Contact.Id}
(...)

Where am I going wrong?

 
For both the flows I have created, when I get to the end of the flow, and am returned to my retURL, the format of the page changes- like a completely different set of CSS:

Before the Flow:

Before Flow

After the Flow:
After Flow

The only thing I can imagine to be the problem is that I have added an "&isdtp=mn" to my button URL- I did this so that when I was returned to my Opportunity, I wouldn't have a double header and sidebar.  Perhaps I need a different parameter value to serve that purpose?  I have not found a good resource for these kinds of parameters online. 
I'm trying to duplicate a visualforce page from a managed package so that I can modify some parameters in it.  I've gotten it appropriately saved, however, it does not show as one of the available pages to select when I go to add it to the enabled VF pages list on my site guest user profile.

Why not?
We are using a custom App for event ticketing.  When we enter a Membership Opportunity, we need a way to easily create a discount record on our event template, so that when we process a membership we can easily create the discount.

The objects aren't really related in any way, so I can't use a workflow.  My idea was to create a Visual Flow, and then publish that as an Opportunity Detail button.  Once our Membership Coordinator enters the membership, he can click the button to automatically use the values from the Membership Opportunity record to create the discount record in the custom Discount object.

Seems feasible, but I'm not sure how I could access the current record at the beginning of my flow to set the values I would need- like grabbing the Opportunity ID, maybe from the screen URL,  and then looking up the values for that record and creating a new Discount record based on those values.

Suggestions?  Or is this not really a practical approach? Triggers are a bit over my current proficiency, and I'd like to have a reasonable solution sooner than I could teach myself that sort of thing.

TIA, Amanda
I have a dynamic choice for Account records, and I want to use the Billing Address for the  label.  Unfortunately, I suppose because Billing Address is a native formula field, this comes out looking like API Addrress [Street,City,State,PostalCode,Country,null,null, null, null] which is reasonably functional but still confusing to the end user.

I can't use Billing Street alone- this wouldn't be enough information to verify which record matches the available address.

Anyway to format this differently, or do I have to make a custom formula field for this?
I'm trying to deploy an inbound change set with a flow, and the deployment keeps failing with this error:

System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: Object_API_Name__c duplicates value on record with id, Stack Trace: Class.testChatterOpptyOnAccount.testChatterOppty: line 6, column 1

All the research I've done suggests that this either has something to do with field history tracking or Chatter Feed tracking.  I've disabled tracking field history on all the relevant objects referenced in the flow, and I've disabled the Chatter feed tracking as best I can.  I'm apparently not allowed to disable feed tracking for testChatterOpptyOnAccount.testChatterOppty

We hardly use Chatter at all.  This is driving me batty- how do I get this flow to deploy?

testChatterOpptyOnAccount
Modifying some existing code that updates a record and then redirects to a new page. I need to change it so that it runs a query to identify the correct record to update, and then updates the record.
 
public PageReference saveAttendee(){
     
         List<CnP_PaaS_EVT__Event_attendee_session__c> attendee = [SELECT Id, Name, DTCI_Agreement_Active__c, CnP_PaaS_EVT__First_name__c, CnP_PaaS_EVT__Last_name__c, DTCI_Ticket_Level__c, CnP_PaaS_EVT__EventId__r.CnP_PaaS_EVT__category__r.name                                                                                                                                                          
                                                                       FROM CnP_PaaS_EVT__Event_attendee_session__c                                                                            
                                                                       WHERE CnP_PaaS_EVT__Registrant_session_Id__c =:registrantId 
                                                                            AND DTCI_Ticket_Level__c =: ticketLevel           
                                                                            AND DTCI_Attendee_Info_Assigned__c = FALSE
                                                                       ORDER BY DTCI_Ticket_Order__c
                                                                       LIMIT 1
                                                                      ];
        
        attendeeId = attendee.Id;                                                              
        attendeeFirstName = attendee.CnP_PaaS_EVT__First_name__c;
        attendeeLastName = attendee.CnP_PaaS_EVT__Last_name__c;
        mailingCity = attendee.DTCI_Mailing_City__c;
        mailingCountry = attendee.DTCI_Mailing_Country__c;
        mailingCounty = attendee.DTCI_Mailing_County__c;
        mailingState = attendee.DTCI_Mailing_State__c;
        mailingStreet = attendee.DTCI_Mailing_Street__c;
        mailingZip = attendee.DTCI_Mailing_ZIP_Postal_Code__c;
       
                                   
        update attendee;                                        
        
PageReference sendToReleaseForm = new PageReference('/apex/DTCI_Release_Form_Page_AB' + '?attendeePageId=' + attendee.id + '&registrantPageId=' + registrantId + '&eventPageId=' + eventId + '&releasePageType=' + attendee.DTCI_Release_Type__c);  
        sendToReleaseForm.setRedirect(true);                        
        return sendToReleaseForm;     
    }

How can I query the object to find the next suitable record to update and still create the PageReference I need to move forward?

 
I had massive issues trying to log on at  #DF15 DevZone. I want to start some Trailheads, but I'd really like to get the achievements attached to the personal dev account I set up on my gmail for my cert rather than my work email account. But I'm locked out now and I'm advised to contact my Admin- no idea who that would be,that's always been me! I've tried resetting the password, how can I get unlocked?
I'm trying to finish up an app created for Salesforce1. The app inludes a getFeedback survey- which works by an output link button that sends the user to the survey. Once the user has completed the survey, I would like them to return to a confirmation page that tells them they are done.

I initially tried putting the survey in an iframe, but couldn't get out of the iframe once in it. Instead, I set the redirect feature of the survey to go to the confirmation page with all the necessary parameters. I'm limited is how I can use that redirect, since I can only define it with the URL in the survey administration. This plan worked great on my pc- the user could progress through the app, continue through the survey, and return to the app all within the same window.

But in Salesforce1, when my output link goes to the survey, it opens in a new browser window kind-of 'within' Salesforce1, so at the end of the survey, the user goes to the correct VF page- but it's in the new window launched by the survey, and the old window is still underneath.
The external link opening in a new window is an intentional feature of Salesforce1- but I need to create a way to close that window and redirect to the correct page in the parent window at the end of the survey.

Here's the code I'm currently using for the button to go to the quiz.
 
<apex:outputLink id="postTourQuizButton" styleClass="btn"
 value="https://www.getfeedback.com/r/{!surveyid}?CnP_PaaS_EVT__Event_attendee_session__c={!selectedAttendeeButtonId}">
   What did you Learn about Wildcats? 
</apex:outputLink>



 




 
Working on a ticket check-in Salesforce1 app. My relevant page code is:
<apex:inputField required="true" styleClass="detail" id="agreementField" value="{!Release_Form__c.DTCI_Agreement__c}">                                    
                <apex:param name="Type" value="{!Release_Form__c.DTCI_Agreement__c}" assignTo="{!agreement}"/>                            
            </apex:inputField>                       
            <br/>                           
            <apex:commandButton styleClass="btn" action="{!saveRelease}" value="Submit" title="Submit" immediate="false" />            
            <br/>

This works great in my sandbox if I'm on my PC, I cannot click the Submit button without checking the box, and if I try to do so, I get the appropriate error message. However, in our demo, we discovered that in Salesforce1, the user could submit and move on without checking the box.

Does anyone know why this might be happening and what workaround I could create? (I'm pretty rough at Javascipt, so if the workaround is Javascript, extra syntax would be awesome)

I can't imagine that this issue is by design.

 
 
 
I wanted to spruce up the text on a commandButton by applying more than one CSS font class on the button label, but I get errors when I use tags inside the value parameter

Page Code:
<apex:commandButton styleClass="btnOrange" action="{!postTourQuizLink}"
value="What did you <font class='Papyrus'>Learn</font> about <font class='Papyrus'>Wildcats</font>? <font class='Afrika'>\</font>"
title="Take the post-Tour Quiz" immediate="false" />

I've also tried removing the value param and putting the label text between tags: <apex:commandButton>Label</apex.commandButton>

I tried creating a variable quizButtonTxt inside the postTourQuizLink function (on the extension ctrl) and then putting value="{!quizButtonTxt}", also not helpful. 

I'm a SF Admin/code hacker-modifier, and so I don't know enough to come up with a workaround- any suggestions? Special character references?

 
I have two objects whose values I would like to include in the same report, but they don't have any relationship already created.  However, they do both have an order number text field that represents the same value 1:1

I tried to create a custom lookup and populate if with a workflow, but can't figure out how to make it work.

I found some reference that indicated this might be doable with the Process Builder, but I haven't tackled the Process Builder before.  Is there any other option?

Has anyone ever created a formula to proper case fields?

 

Thank you,

Steve

Good Morning Ladies and Gents,

 

I am having the following issue. I have implemented a captcha widget to my downloads page since there were a log of spam files that were coming through. After hours of working on this I have finally gotten the Captcha app to work and forward after successful entry to the actual download page. 

 

However, the lead info that was inputted in the form is not being forwarded as a lead at all. My guess is that the code is missing in the verify.php file. But I am not entirely too sure. Might have taken on a bit too much of a project with this one. 

 

 
FORM.PHP
<form action="verify.php" method="POST">
<input type=hidden name="oid" value="SALESFORCE I.D.">
<input type=hidden name="retURL" value="/downloads.php">
  <label for="first_name"><br />
    <strong>(*) Fields that are required </strong><br />
    <br />
    First Name (*)</label><br />
  <input  id="first_name" maxlength="40" name="first_name" size="20" type="text" required="required" /><br>
       
  <label for="last_name">Last Name (*)</label> <br />
  <input  id="last_name" maxlength="80" name="last_name" size="20" type="text" required="required"  /><br>
        
  <label for="email">Email (*)<br />
  </label>
  <input  id="email" maxlength="80" name="email" size="20" type="text" required="required" /><br>
        
  <label for="phone">Phone <br />
  </label>
  <input  id="phone" maxlength="40" name="phone" size="20" type="text" /><br>
        
  <label for="company">Company <br />
  </label>
  <input  id="company" maxlength="40" name="company" size="20" type="text" /><br>
        
  <label for="city">City <br />
  </label>
  <input  id="city" maxlength="40" name="city" size="20" type="text" /><br>
        
  <label for="state">State/Province <br />
  </label>
  <input  id="state" maxlength="20" name="state" size="20" type="text" /><br>
        
  <label for="country">Country <br />
  </label>
  <input  id="country" maxlength="40" name="country" size="20" type="text" /><br><br>
  <strong>Interest (hold Ctrl (Windows) / Command (MacOsX) to select more than one)</strong></p>
<select  id="SALESFORCE_ID" multiple="multiple" name="SALESFOCE_NAME" title="Interest"><br>
<option value="C5">C5</option>
<option value="D5">D5</option>
<option value="Dispensing">Dispensing</option>
<option value="In-Line">In-Line</option>
<option value="M7">M7</option>
<option value="M75">M75</option>
<option value="M7 HP">M7 HP</option>
<option value="M8 Cube">M8 Cube</option>
<option value="M8">M8</option>
<option value="M85">M85</option>
<option value="M10 Pro">M10 Pro</option>
<option value="M10 Power">M10 Power</option>
<option value="ML">ML</option>
<option value="MXL">MXL</option>
</select>
<br>
<label for="lead_source"></label>
<input id="lead_source" maxlength="40" name="lead_source" size="20" option value="Web Form" type=hidden />
<?php
require_once('recaptchalib.php');
    $publickey = "PUBLIC_GOOGLE_cAPTCHA_kEY";
    echo recaptcha_get_html($publickey);
?>
<input type="submit"/>
</form><p>&nbsp;</p>

 

 

 
VERIFY.PHP
<?php
 require_once('recaptchalib.php');
 $privatekey = "GOOGLE CAPTCHA PRIVATE KEY";
 $resp = recaptcha_check_answer ($privatekey,
                                 $_SERVER["REMOTE_ADDR"],
                                 $_POST["recaptcha_challenge_field"],
                                 $_POST["recaptcha_response_field"]);
 if (!$resp->is_valid) {
   // What happens when the CAPTCHA was entered incorrectly
   die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
        "(reCAPTCHA said: " . $resp->error . ")");
 } 
 else {
   // Your code here to handle a successful verification
   echo '<META HTTP-EQUIV="Refresh" Content="0; URL=downloads.php">';
//    header("Location: https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8");
//    $url = 'https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8';
exit;
 }
 ?>

 

In the above coding the last two lines:

 

//header("Location: https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8");

// $url = 'https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8';

 

Are my guess as to where I should be pointing the forward. However, I thoroughly believe that I am missing something else as I feel as though the SF ID and user name are missing. 

 

Certain values have been replaced due to security reasons. Please let me know if you could further assist with the following to make sure that I can get this thing going as every other hour or so I am getting some spam message from China, 

 

Thank you. 

 

Emanuel.