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 ...
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?" ...
4
votes
How do I read out the value of my checkbox?
Try this: :)
var selected = event.target.checked; //true or false
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 ...
4
votes
toggle inputCheckbox in Component
Since you've specified the data type as Boolean, I'm pretty sure you need to use native Boolean values. Try this version:
({
changeCheckBox : function(component, event, helper) {
...
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 ...
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 ...
4
votes
Accepted
Entity is not API accessible Error
Here is the error:
valuesList = split.fSPE('(,)',0);
If you comment this out, the Entity is not API Accessible error goes away (other compiler errors are exposed). You probably wanted
valuesList = ...
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....
3
votes
Accepted
Error: <apex:column> must be the direct child of either <apex:dataTable> or <apex:pageBlockTable>
You cannot use <apex:column> directly in <apex:pageBlock> .
You are code should be like this.
<apex:pageblock>
<apex:pageBlockTable value="{!contactlist}" var="cont"><!--...
3
votes
Accepted
Select Records in pageblocktable using a checkbox
There is a very good example by Jeff. You can take reference.
Controller Code
public with sharing class PagingController {
List<categoryWrapper> categories {get;set;}
// instantiate ...
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;}
...
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" />
...
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:...
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 ...
2
votes
Accepted
How do I make a SLDS checkbox default to appear checked?
Here's the solution:
<div class="slds-media__body">
<div class="slds-media">
<div class="slds-media__figure">
<label class="slds-checkbox" for="mark-...
2
votes
Accepted
Disable all other checkboxes when one checkbox is selected in pageblocktable
Create a variable in apex class
public Id idSelected {get; set;} // this will contain the selected record id
create a method
public void disableCheckbox()
{
//iterate over your wrapper and set ...
2
votes
toggle inputCheckbox in Component
Sticking the following JavaScript alert in your controller after you set getAttributeValue, you will find that it returns false:
alert(getAttributeValue=="true"); // false
This is because you've ...
2
votes
Accepted
inputcheckbox behavior with select option actionfunctions clarification
I'll update this with an additional version that uses an actionFunction in the way that it appears you're trying to use it... but wanted to start with this base.
Update: ActionFunction version added ...
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]")....
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"&...
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
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");
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 ...
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 ...
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 ...
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....
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="...
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 ...
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" ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
inputcheckboxes × 92visualforce × 44
apex × 28
javascript × 13
lightning-aura-components × 8
wrapper-class × 8
lightning × 5
checkbox × 5
lightning-web-components × 4
actionsupport × 4
custom-object × 3
controller × 3
picklist × 3
html × 3
jquery × 3
slds × 3
inputfield × 3
repeat × 3
selectoption × 3
ampscript × 2
formula × 2
custom-field × 2
lightning-design-system × 2
rerender × 2
pageblocktable × 2