function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DataDarling80DataDarling80 

Web-to-Lead replacement

So my Web site has problems and cannot host W-2-L forms (let's just leave it at that), so I am working in Visualforce and Sites to create a replacement/workaround.  2 problems so far:

 

  • Need the trick for collecting zip codes in a Lead Visualforce form.  I've tried any combination of postal/zip, with underscores/code and without. (Lead.zip, Lead.zipcode, Lead.postal_zipcode, Lead.postal_zip_code.)
  • Haven't seen much on how I would hide the actual field name and replace it with a longer, more narrative field name for the benefit of the "customer" on our Site. Seems like I might have to make my style sheet have a white color for font every actual field name and a mock field name in a color you can see.  Is this the way to go about it?

Thank you!

jkucerajkucera

If I understand you correctly, you want the fieldname for Zip:

 

Lead.PostalCode

 

The API doc's are great for finding field names:

http://www.salesforce.com/us/developer/docs/api/index.htm

werewolfwerewolf
Also very handy is the Force.com IDE.  If you download that and connect it to your org, you'll notice an icon entitled Salesforce.schema.  Double-click that and you'll find a little query builder wherein you can explore your entire data model from the perspective of the API (and test your queries too).  It's quite useful.
DataDarling80DataDarling80

That worked!  Thanks!

 

What about my other question regarding how to hide the actual field name and replace it with a longer, more narrative field name. Can I do this in Visualforce?

jkucerajkucera
I haven't figured out how to change a field's displayed label for visualforce.  Maybe werewolf has a silver bullet for you.
werewolfwerewolf
apex:inputField renders its own label text which is auto-translated and such, but if you want other text you have to use a more specific component like apex:inputText, next to which you can put your own label text because it doesn't render its own.
DataDarling80DataDarling80

So does that apex:inputText then communicate to a field in SF like W2L, or how does that work? I need to be able to run workflow on the incoming data and have already built out all my fields, created the form in Visualforce, etc.  But there's some serious verbiage in the Eligibility Form that I'm trying to replicate.

 

Thanks!

werewolfwerewolf
Yes, you can map inputText to a field just as you do with inputField.  inputField is smarter in that it will modify its own display properties according to the underlying field, but if your field is a text field then inputText should work just fine.
DataDarling80DataDarling80

I can't have all text fields since I hope to run workflow rules on the answers to my form.

 

What about if my field is a picklist called <apex:inputField value="{!Lead.Governing_Body__c}"/> with answer options Yes, No, Not sure.  What the designers of the eligibility survey want for the field name:

 

6. Does your organization have a governing body (e.g. board of directors, board of trustees, board of governors) that is established, has held a meeting, and is currently able to reach a quorum?

 

But because of field name size limits I can't have the field name be that long, I have to have something shorter.  I was hoping I could make "Governing Body" field name appear white with HTML or something and above it write the narrative question.

 

Are there apps out there that would interface better this way?  What am I missing?

dev7894dev7894

<tr>

   <td>name of the field u want to display</td>

   <td><apex:inputField value="{!Lead.Governing_Body__c}"/></td>

</tr>

 

Does this help

 

Thanks!