You need to sign in to do that
Don't have an account?
IntroAmmy
Need to add hidden field with Default value
I need to add lightning input hidden field with default value "DSP"
When i will save my form with other fields which is in web form this default value will insert in obeject.
<aura:attribute name="dsp" type="String" default="DSP"/>
<lightning:input name="dsp form" value="{!v.leadObj.BIIB_DSP_Form__c}" label="Form" class="slds-hide"/>
Contrller .js
doInit: function(cmp) {
component.set("v.leadObj.BIIB_DSP_Form__c" ,"DSP");
var pickvar = cmp.get("c.getPickListValuesIntoList");
pickvar.setCallback(this, function(response) {
var state = response.getState();
if(state === 'SUCCESS'){
var list = response.getReturnValue();
cmp.set("v.picvalue", list);
}
else if(state === 'ERROR'){
//var list = response.getReturnValue();
//component.set("v.picvalue", list);
alert('ERROR OCCURED.');
}
})
$A.enqueueAction(pickvar);
},
Can someont help me where i am doing wrong
When i will save my form with other fields which is in web form this default value will insert in obeject.
<aura:attribute name="dsp" type="String" default="DSP"/>
<lightning:input name="dsp form" value="{!v.leadObj.BIIB_DSP_Form__c}" label="Form" class="slds-hide"/>
Contrller .js
doInit: function(cmp) {
component.set("v.leadObj.BIIB_DSP_Form__c" ,"DSP");
var pickvar = cmp.get("c.getPickListValuesIntoList");
pickvar.setCallback(this, function(response) {
var state = response.getState();
if(state === 'SUCCESS'){
var list = response.getReturnValue();
cmp.set("v.picvalue", list);
}
else if(state === 'ERROR'){
//var list = response.getReturnValue();
//component.set("v.picvalue", list);
alert('ERROR OCCURED.');
}
})
$A.enqueueAction(pickvar);
},
Can someont help me where i am doing wrong
I found a similar type of query as you have. please go through the below link.
-https://developer.salesforce.com/forums/?id=9060G0000005iekQAA
-https://salesforce.stackexchange.com/questions/204745/how-to-create-a-hidden-input-field-in-a-lightning-component
Please mark it as Best Answer if it helps you.
Thanks & Regards
Suraj Tripathi