Skip to main content
14 votes
Accepted

The purpose of ARIA attributes in Lightning components

The Accessible Rich Internet Applications specification provides accessibility features for disabled individuals, as stated in the RFC: Accessibility of web content requires semantic information ...
sfdcfox's user avatar
  • 495k
8 votes
Accepted

How can I force Visualforce to include empty attributes which I have specified?

Here is another way to do it w/o javascript: Set the value to a VisualForce function that evaluates to nothing: <apex:page standardController="Contact" > <apex:form> <select ...
HungryBeagle's user avatar
6 votes
Accepted

draggable="true" is not working in firefox for Lightning Component

As per this blog post "To make an element draggable set draggable attribute to "true". However this is not enough to make elements draggable in Firefox. You need to locate the dragstart event and set ...
Saroj Bera's user avatar
  • 14.8k
5 votes
Accepted

Lightning component access to scrollTop

What component has aura:id="myComponent" on it? I would expect to see something like: <tbody aura:id="myComponent" ... in your Lightning markup. Also, I just checked and scrollTop is not ...
Doug Chasman's user avatar
  • 10.1k
5 votes
Accepted

Sorting List in descending order

If you invert the sign of your Comparable, you'll get descending order. Depending on your exact requirements, this is usually pretty easy. Consider the following code: public class MyController { ...
sfdcfox's user avatar
  • 495k
5 votes

Document.fullScreen API implementation in Lightning Web Components(LWC)

Locker is currently preventing access to the fullscreen API, not LWC. You can try out the following snippet of javascript in the Locker console. document.body.requestFullscreen // Locker OFF: ...
pmdartus's user avatar
  • 2,687
5 votes

How to get Id of the created record when using .submit function

According to docs Returning the Record Id LWC documentation, record ID is returned via onsuccess handler. Example given below same as doc. <template> <lightning-record-edit-form object-...
Nagendra Singh's user avatar
4 votes
Accepted

Local Web Storage for Apex

Local Storage is (sub-)domain specific, as a security feature. Each domain gets its own storage area, and that storage area is limited to 5 MB of space. If you set an item "outside of salesforce", it'...
sfdcfox's user avatar
  • 495k
4 votes

document.getElementById().value not working for <textarea> in lightning component

The value property of textarea has just been whitelisted and should be available next week.
JF Paradis's user avatar
  • 2,460
4 votes
Accepted

Visualforce Page: Error for Input Type Number: Unable to validate type 'number': data type not provided

apex:input expects a property in value field, following code is working fine: Controller: public class Html5Input { public Integer accountNumber { get; set; } } Page: <apex:page docType="...
Raul's user avatar
  • 18.8k
4 votes
Accepted

Html5 data list not displaying in lightning component

After some research came to know that list attribute is not supported in input tag when used in Lightning component. To make it work we can add the list attribute in input text from within the ...
Monalisa Das's user avatar
4 votes
Accepted

HTML5 DocType not getting set

Adding a "custom" contentType appears to suppress the DOCTYPE. Do not add this attribute if you need the DOCTYPE. <apex:page applyBodyTag="false" applyHtmlTag="false" showHeader="false"...
sfdcfox's user avatar
  • 495k
4 votes

Star Rating not rendering on custom HTML email in Marketing Cloud

It's usually not best practice to have form controls within a email. Your issue may be arising from how different ISPs treat form inputs in emails. I've worked on similar functionality before. ...
Noor Alam's user avatar
  • 755
4 votes
Accepted

HTML <select> required Attribute not working in Visualforce?

I had the same issue and I've got this working now: Instead of: <option value="">None</option> Use the following: <option label="Please Select" value=""></option> I ...
Vasile Fana's user avatar
4 votes
Accepted

How to concatenate a value inside of the href property on lwc

LWCs Templates are logicless and don`t support any Expressions anymore (see also here/here) The engine doesn’t allow computed expressions In your case you should either add a new computed ...
Renji-xD's user avatar
  • 2,791
4 votes
Accepted

Is it possible to customize the look and feel of the Forward to a Friend Default Page

Other than through the usual BrandBuilder colours and logo, not really. Certain levels of Support have access to Manage to alter the Brand Tags that define much of the page design, but getting ...
Macca's user avatar
  • 8,256
3 votes
Accepted

Water ripple effect on background

This page produces the ripples when you move the cursor over the page header or footer: <apex:page> <apex:sectionHeader title="Test Page"/> <p>Test Page Body</p> <script ...
Keith C's user avatar
  • 136k
3 votes
Accepted

Formatting an outputText value field in HTML (VF Page)

I recommend using the ROUND(number, num_digits) function. From the Visualforce Developer Guide on Functions: Function ROUND Description Returns the nearest number to a number you specify, ...
Adrian Larson's user avatar
  • 150k
3 votes

how to compress the image size in visualforce page

The Salesforce server-side-language Apex does not include the byte-level access that would be needed to implement compression there (or include an API for image compression). That leaves you with ...
Keith C's user avatar
  • 136k
3 votes

document.getElementById().value not working for <textarea> in lightning component

This is a Locker Service issue. Look at the source here: https://github.com/forcedotcom/aura/blob/master/aura-impl/src/main/resources/aura/locker/SecureElement.js The value property of textarea has ...
Charles T's user avatar
  • 11k
3 votes

HTML5 input type number for decimals

<apex:page standardController="Object" doctype="html-5.0"> <apex:input type="Number" html-step="any" Value="yourValue"/> </apex:page> Be sure to specify doctype="html-5.0" and the ...
user40575's user avatar
3 votes

Can't save pasted email code

After narrowing it down to that one table, I ended up rewriting the div with text in it by hand. I guess I may have copied that text block and something weird got copied over. Guess I learned my ...
Kathryn Crawford's user avatar
3 votes
Accepted

How to debug HTML file in Lightning Web Components?

HTML and Javascript are cAsE sEnSiTivE. The only way to debug is through javascript (you cannot really do anything in HTML). getAccList({ name: this.searchKeyAcc }).then(result =>...
salesforce-sas's user avatar
3 votes
Accepted

LWC- template for loop - having each loop values appear on a different column

Why don't you try something simpler like building this out to use the lightning-layout? Inside the layout you can specify the details of each element or even include a new component for each one. you ...
Ronnie's user avatar
  • 2,118
3 votes
Accepted

How to prevent <lightning-input-field> from changing the column width of Custom Datatable in LWC

Introduce a new style in the css code file. .tr-width { width: 40%; } Use the css class on the specific td element of the HTML table (as shown in the code snippet below). <!-- this is the ...
arut's user avatar
  • 5,311
3 votes

Lightning Web Component That Allows Text Input and Dropdown

You likely need a typeahead or text lookup. There are a lot of components built by the people. It won't look exactly as drop-down. If you want to build that from scratch then you can use the lightning ...
manjit5190's user avatar
  • 8,043
3 votes
Accepted

LWC - render HTML inside an HTML tag

You can use a lightning-formatted-rich-text component to render the HTML. This component supports the tags in your example, such as b, p, ol, and ul. Depending on your actual HTML, you will want to ...
Matthew Souther's user avatar
3 votes

How can I select More than one option from different radio group buttons in LWC?

For each radio group, name attribute should be unique. I can make an assumption, that in your case attributes name are the same. salesforce recommends not to set name, as it will be generated ...
Oleksandr Berehovskyi's user avatar
3 votes
Accepted

Can we use Swipe / Touch events in LWC mobile

In LWC, you're not allowed to use innerHTML, except in some cases, and document.querySelector will have unexpected behavior. Here's the minimum modifications to make your code work: <template> ...
sfdcfox's user avatar
  • 495k
2 votes

How to specify a background image for PageBlockTable

You can just use some CSS: <style> .tableWithBgImage { background-image: url({!$Resource.someStaticImage}); } </style> Then, apply the style to the table: <apex:...
sfdcfox's user avatar
  • 495k

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