Hot answers tagged

9 votes

(Lightning) How do I get the selected value from a Select dropdown list & send it to a method?

In your javascript controller, you can get the component using the find method and then get the attribute value of the comonent using the get method.. component.find("categoryPicklist").get("v.value")...
user avatar
9 votes

How can I create an UnsubEvent using AmpScript in a Landing Page

The code in the documentation should work fine, you just need to make sure the required variables all get set properly before executing the API calls. This piece of code is using the RequestParameter ...
user avatar
  • 1,958
7 votes
Accepted

Pre-populating checkbox fields in a CloudPage in Marketing Cloud

@TCassa, your approach appears correct. I've taken this approach many time before. I suspect it is just something minor in your code like a syntax issue or undefined variable. Suggestion: I've ...
user avatar
  • 2,585
5 votes

Adding Auto-Save Functionality to a Visualforce Page

You can use localStorage or sessionStorage, available in 94% of all browsers globally, to unobtrusively store and load data on demand. Save formats may not be compatible across changes to the page, ...
user avatar
  • 434k
5 votes
Accepted

Error Handling in apex class method.

To display a message on your page you can add <apex:messages/> as suggested in the comments. And to stop execution you need to put the code that you don't want to execute if Account was not ...
user avatar
  • 2,101
5 votes
Accepted

html button inside Visualforce page generate a refresh on the page without any action connected to it

Here is a link that explains how html treats buttons and difference between <button> and <input type="button"> Form buttons created by <button> element are treated as form ...
user avatar
  • 1,802
5 votes

How to submit Cloud Form without redirecting

This is not a salesforce question. This is a question purely based on web technology. The fast answer: your web form has an attribute called target, this can be self or blank or ... . self will ...
user avatar
4 votes
Accepted

Datepicker on Salesforce Visualforce pages,

As this looks like jQueryUI's datepicker, the JavaScript below reflects that assumption. The <apex:inputField> will render an input element. You don't need to wrap it with another one. The ...
user avatar
  • 22.3k
4 votes
Accepted

Autonumber in Marketing Cloud?

There's no auto-numbering in SFMC. You have a few options: You can assign them a GUID with the NewID() SQL function in a Query Activity. You can reference the hidden _CustomObjectKey column in a ...
user avatar
4 votes

Collect user form input data from a web site

As per your situation, I'd recommend using DE manager since it is really easy to implement. You'll need couple of things: 1) Setup the Data Extension in Salesforce Marketing Cloud with field that ...
user avatar
  • 3,085
4 votes
Accepted

How to add lightning:input to lightning:recordEditForm

The best thing to do for your specific scenario is to 'hide' the lightning:inputField and add a lightning:input, similar to what Uwe Mentioned, however, you dont really need to do anything with the ...
user avatar
  • 19.3k
4 votes
Accepted

Unintended Page refresh command button inside form

use reRender attribute on apex:commandButton here is a nice article Implementing Partial Page Updates with Command Links and Buttons where all required steps are listed First, create or identify the ...
user avatar
4 votes
Accepted

Building a Salesforce Form using Sites that is Time-bombed

You could certainly create an expiring token to "time bomb" your page. The following steps should provide an outline: Add a field named Form_Token__c Text (32) Add a Time Based Workflow Rule to clear ...
user avatar
  • 143k
3 votes
Accepted

What level of access to Salesforce backend the client could provide a developer?

Causeview is a third-party product built on top of the Salesforce platform to handle donation processing, and (as you can guess from the URI you are IFRAME-ing) their forms are not actually generated ...
user avatar
3 votes
Accepted

LiveAgent - preChat: "The chat window may only be launched from a button -- you cannot access it directly."

It could be a problem of access to the PreChat page. Try to add it to the Site Visualforce Pages of a public Site and give the right accesses to the page itself.
user avatar
3 votes
Accepted

Handle Multiple <apex:form> elements in one Visualforce page

Try using a tag that doesn't need to live inside a form (like an outputLink), and adding actionSupport to call the UpdateABC method. Something like: <apex:outputLink> [link text here] &...
user avatar
3 votes
Accepted

What are the options for building custom Apex endpoint to accept HTML form from website

Is it possible to create an apex endpoint to which I can submit a form? Yes, that's one valid use of the @RestResource annotation. After all, a "REST Resource" is simply an HTTP endpoint like any ...
user avatar
  • 434k
3 votes

Using AMPScript to Pre-Populate a Smart Capture Forms in Salesforce Marketing Cloud

There are 2 ways that we use to pass user information to Landing Pages: Option 1: QueryParameter In Email: %%[VAR @email,@name,@landingpage Set @email = 'email@example.com' Set @name = 'Test' Set @...
user avatar
3 votes
Accepted

How do I send a Pardot Prospect an email every time a specific Prospect field changes?

Pardot: June 29, 2017 Pardot Automation Rules now have ‘repeat’ functionality. This new feature allows the User to determine if an Automation Rule should be allowed to match a prospect more ...
user avatar
  • 2,089
3 votes
Accepted

Setting Tab Order in Lightning Component input fields

You cannot directly control the tab order in Lightning any longer. This is documented in the Known Issue. Please don't use tabindex values aside form 0 and -1. If you want to change the tab order on ...
user avatar
  • 434k
3 votes

How to submit apex:form using apex:actionfunction

Yes, you can do this, just make sure you cancel the default action: <apex:actionFunction name="doAction" action="{!someMethod}" /> <button onclick="doAction(); return false;">Do Action!&...
user avatar
  • 434k
3 votes

How to post form data to custom object?

Welcome to SFSE! It looks like your standard controller is pointed to the Student__c Object, but all of your bindings are to the Contact object, like this <apex:inputField value="{! Contact....
user avatar
3 votes
Accepted

How to get <apex:form> to have two INDEPENDENT columns with fields?

Unfortunately you can't specify columns that way with apex:pageblocksection, it's always left-to-right. You could just use one field set and just training people to put them into the field set in the ...
user avatar
3 votes

Building a Salesforce Form using Sites that is Time-bombed

Another thought... You could store a secret key in a custom setting or custom metadata. When you generate a link, it will have an expiry timestamp parameter, a customer ID parameter and a hash ...
user avatar
  • 10.6k
3 votes
Accepted

Validate a form with Apex and server side controller

You should probably update your post with your last comment, additionally, based on all your recent posts, it would seem you could benefit from following Trailhead modules, such as this one -> ...
user avatar
  • 19.3k
3 votes

Add data entered in a cloud page form into a data extension in marketing cloud

It's possible. You didn't specify where your custom form would reside, so I'm going to use a pair of CloudPages for a BARE-BONES (i.e., no fancy JS) example. We'll need: A page that contains the form ...
user avatar
  • 1,457
3 votes

Collecting birth dates in an Interactive Email Form Block

You can break the date down into multiple fields which would allow you a bit more control over the format. For example, you could use a select input for the month and day and then have use a text ...
user avatar
  • 81
3 votes

Using AMPScript to fill SubscriberKey in Smart Capture Form in Salesforce Marketing Cloud

You don’t need the %% signs inside of an AMPscript block. This is the correct synthax: %%[ VAR @SubscriberKey, @EmailAddress set @EmailAddress = emailaddr set @SubscriberKey = Concat('TEST_', @...
user avatar
  • 10.4k
3 votes

Visualforce components disappeared after an action

I'm not sure about the "why" your problem happens, but I would try solving it by narrowing the scope of the rerender, e.g. try to rerender a panel around your <table> element: <apex:...
user avatar
3 votes
Accepted

Why is my recordId undefined ? LWC

I got it. I had everything right but was trying to retrieve the recordid from the wrong component. My component is inside another and it's this one which is on the record page. Hope I can help someone ...
user avatar
  • 223

Only top scored, non community-wiki answers of a minimum length are eligible