Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
4 votes
Accepted

How to style a checkbox in a Visualforce page using Lightning Design System?

Sometimes you have to change the SLDS example to work correctly with Visualforce. Visualforce depends on the input field having a specific "id" attribute, so the id of the checkbox is actually ...
Mike's user avatar
  • 754
4 votes
Accepted

Salesforce Lightning make checkbox checked using jQuery

ui:inputCheckbox is not a standard html element. You can't use jQuery to change any of it's attributes like that. What you can do is bind it's value attribute to your getGifting array and set that to ...
Caspar Harmer's user avatar
4 votes
Accepted

How do I read the value from an input checkbox?

I believe you may just have the name of the event wrong. On the checkboxes, the event being sent is called change like this: component.cmp <ui:inputCheckbox aura:id="checkbox" label="Select?" ...
Etienne Rocheleau's user avatar
4 votes

How do I read out the value of my checkbox?

Try this: :) var selected = event.target.checked; //true or false
Sharath Jallu's user avatar
4 votes
Accepted

Visualforce: Checkbox is not firing function onclick

The problem is reported in the console: Uncaught TypeError: checked is not a function It seems to be a name conflict but I can't see where. Changing the function name to e.g. isChecked works ...
Keith C's user avatar
  • 136k
4 votes

Visualforce: Checkbox is not firing function onclick

The first thing you should always do when you face a Javascript error is open up the console. Here's how to do it on: Chrome Firefox Opera Safari IE If you had done so, you would have seen the ...
Adrian Larson's user avatar
  • 150k
4 votes
Accepted

LWC Wrapper List Update not reflecting in client side JS or Apex

Firstly, input type checkbox will show you true or false automatically and you need not have separate template if:true. For checkbox, you should use checked attribute for binding boolean and not value....
salesforce-sas's user avatar
3 votes

Bind checkbox value with controller boolean variable

Looks like you have not initialised the value for "P". Initialise the value in the constructor. VF Page: <apex:page controller="CheckboxController"> <apex:form > <apex:...
Sumuga's user avatar
  • 2,149
3 votes
Accepted

how to change color of checkbox in lightning

You can override the lightning design system styles by defining your own css classes. First, you have to add your class to the input: <ui:inputCheckbox class="green-checkbox" value="true" /> ...
Martin Lezer's user avatar
  • 7,295
3 votes

How to get the value of the selected checkbox in visualforce page and pass it to controller

Create one more string variable in your wrapper class and bind that with your select List public class myWrapperClass{ public String opp{get;set;} public String selectedvalue{get;set;} ...
Tushar Sharma's user avatar
3 votes

lightning:checkboxGroup - set checkbox indeterminate = true

If you are using <lightning:input type="checkbox" ... /> then I think you are stuck for now as that does not expose an attribute that can set the underlying DOM indeterminate property that then ...
Keith C's user avatar
  • 136k
2 votes

How to disable checkboxes when when more than 6 checkboxes are selected?

You can put Jquery validation instead of taking apex route $("input[name=chk]").change(function(){ var max= 3; if( $("input[name=chk]:checked").length == max ){ $("input[name=chk]")....
Tushar Sharma's user avatar
2 votes

Hide/Show Button On VisualForce Page

Hi this is my first answer!!! I have just done this in my org using <apex:actionSupport/> This is a very simple code: VF Page: <apex:page controller="DisplayButtononCheckboxEvent"&...
Rishabh Seth's user avatar
2 votes
Accepted

show checkbox before every contact using wrapper class

The name of the contact var in the wrapper is conWrap so you should use that ContactTable.conWrap.FirstName
Eric's user avatar
  • 54.2k
2 votes

How do I read out the value of my checkbox?

To get the value, just get the value from the attribute you assigned: var something = component.get("v.something__c");
sfdcfox's user avatar
  • 493k
2 votes

How to pass list of email ids to next VF page

A simple way to pass parameters between pages is to add them to the page URL. The Apex PageReference class provides help for this and makes sure that data added is correctly escaped. For this case ...
Keith C's user avatar
  • 136k
2 votes
Accepted

get value of apex:inputCheckbox in jQuery

Visualforce puts automatic stuff on the front of the id of your elements to make sure that they are unique (e.g. when you use them inside an <apex:repeat>). So, you can't just select by the id ...
Aidan's user avatar
  • 13.7k
2 votes

Hide label on ui:inputCheckbox?

i recommend to use lightning:input type is check box lightning checkbox, because of ui name space going to retired in Summer'21 check out here UI name space. more over you can achieve your use case by ...
sdandamud1's user avatar
  • 2,705
1 vote
Accepted

How do I uncheck the checkbox

You need to check if you have an Array or not. var checkboxes = component.find("checkboxField"); if(checkboxes && !checkboxes.length) { // is an object, not an Array checkboxes = [...
sfdcfox's user avatar
  • 493k
1 vote

Conditionally set checkbox Values on Visualforce page

Yes, you can do this in both Apex or JavaScript. As Apex: <apex:actionSupport event="onchange" rerender="table" action="{!a.checkType}" /> ... public void checkType() { if(Condition....
sfdcfox's user avatar
  • 493k
1 vote

Visual Force: Checking boxes individually triggers OnChange, but my CheckAllboxes page component does not

A quick 'n dirty solution would be to switch to 'onclick' instead of 'onchange' and trigger the 'click()' action in your script. <td style="text-align: center" width="4%"><input ...
Guy Clairbois's user avatar
1 vote
Accepted

Asset checkbox not eveluating to true in testclass

An insert DML does not by itself populate formula fields. You need to either query desired fields from your inserted record (other than Id) to obtain their values, or call the sObject method ...
David Reed's user avatar
  • 93.1k
1 vote
Accepted

How can I locate a ui:inputCheckbox?

You cannot assign aura:ids dynamically. https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_ids.htm
Jake Richter's user avatar
  • 1,361
1 vote
Accepted

inputcheckbox not showing in visualforce page

The Contact.DoNotCall field is normally turned off at the "Field-Level Security" level in profiles including the "System Administrator" one. Visualforce respects these field settings by not rendering ...
Keith C's user avatar
  • 136k
1 vote

How do I read the value from an input checkbox?

change <input type="checkbox"/> to <ui:inputCheckbox /> and use the following code onChange : function(component, event, helper) { var identityRequest = component....
Oleksandr Berehovskyi's user avatar
1 vote
Accepted

checkbox checked but row will not showing in Edit Mode(actionFunction not working)

You are reRendering to repeat you should use output panel and from actionfunction you should reRender outputpanel. use this it'll work for you. <apex:page controller="EditContact_controller" ...
Vipin Indora's user avatar
1 vote
Accepted

Using Ampscript to pre-fill form, check box

As mentioned in another post, there's an alternative way to get this working instead of switching to classic content. %%[IF @industry_news == True THEN]%% <input name="industry-news" value="...
sfdcFanBoy's user avatar
  • 4,064
1 vote

Using Ampscript to pre-fill form, check box

Think this is an issue with building the landing page with the "new" content builder interface via cloud pages. It seems to be a bug, as I copied and pasted the code into classic editor and it worked ...
0xsegfault's user avatar
  • 6,603
1 vote
Accepted

Visualforce Checkbox Rerender via Ajax - Whats wrong with my code?

I hope that you are changing checkbox values in the controller method. You can wrap pageblock into an outputPanel and rerender the outputPanel from actionSupport call. Display the pageblock based on ...
Santanu Boral's user avatar
1 vote
Accepted

How to render a checkbox with negated boolean value from model

Save yourself some trouble and enlist the help of jQuery: <apex:page> <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"/> <input ...
Eric's user avatar
  • 54.2k

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