Skip to main content
deleted 37 characters in body
Source Link
David Reed
  • 93.6k
  • 14
  • 90
  • 166

I am new to salesforce. I have created a form where more than 10 radio groups were being used, so instead of using lightning:input tag several times , I made a child component of the radio group . And used it several times in my parent component form by passing label, name and value from the parent component via attributes.

So, all these radio group input fields are required , so after the form is submitted, in my parent controller I want to validate that all required fields have been filled.

I want to use reduce function for that in order to validate all required fields collectively in my parent component controller. So for that component.find('aura:id of my child component's field') is required.

How can I access child component aura ids in my parent component controller, Is the approach that I am following correct? Or there is a better way to do it.

Please help

I am new to salesforce. I have created a form where more than 10 radio groups were being used, so instead of using lightning:input tag several times , I made a child component of the radio group . And used it several times in my parent component form by passing label, name and value from the parent component via attributes.

So, all these radio group input fields are required , so after the form is submitted, in my parent controller I want to validate that all required fields have been filled.

I want to use reduce function for that in order to validate all required fields collectively in my parent component controller. So for that component.find('aura:id of my child component's field') is required.

How can I access child component aura ids in my parent component controller, Is the approach that I am following correct? Or there is a better way to do it.

Please help

I have created a form where more than 10 radio groups were being used, so instead of using lightning:input tag several times , I made a child component of the radio group . And used it several times in my parent component form by passing label, name and value from the parent component via attributes.

So, all these radio group input fields are required , so after the form is submitted, in my parent controller I want to validate that all required fields have been filled.

I want to use reduce function for that in order to validate all required fields collectively in my parent component controller. So for that component.find('aura:id of my child component's field') is required.

How can I access child component aura ids in my parent component controller, Is the approach that I am following correct? Or there is a better way to do it.

added 3 characters in body
Source Link

I am new to salesforce. I have created a form where more than 10 radio groups were being used, so instead of using lightning:selectinput tag several times , I made a child component of the radio group . And used it several times in my parent component form by passing label, name and value from the parent component via attributes.

So, all these radio group input fields are required , so after the form is submitted, in my parent controller I want to validate that all required fields have been filled.

I want to use reduce function for that in order to validate all required fields collectively in my parent component controller. So for that component.find('aura:id of my child component's field') is required.

How can I access child component aura ids in my parent component controller, Is the approach that I am following correct? Or there is a better way to do it.

Please help

I am new to salesforce. I have created a form where more than 10 radio groups were being used, so instead of using lightning:select several times , I made a child component of the radio group . And used it several times in my parent component form by passing label, name and value from the parent component via attributes.

So, all these radio group input fields are required , so after the form is submitted, in my parent controller I want to validate that all required fields have been filled.

I want to use reduce function for that in order to validate all required fields collectively in my parent component controller. So for that component.find('aura:id of my child component's field') is required.

How can I access child component aura ids in my parent component controller, Is the approach that I am following correct? Or there is a better way to do it.

Please help

I am new to salesforce. I have created a form where more than 10 radio groups were being used, so instead of using lightning:input tag several times , I made a child component of the radio group . And used it several times in my parent component form by passing label, name and value from the parent component via attributes.

So, all these radio group input fields are required , so after the form is submitted, in my parent controller I want to validate that all required fields have been filled.

I want to use reduce function for that in order to validate all required fields collectively in my parent component controller. So for that component.find('aura:id of my child component's field') is required.

How can I access child component aura ids in my parent component controller, Is the approach that I am following correct? Or there is a better way to do it.

Please help

Source Link

How to access aura:id of a tag present in child component in a parent component controller

I am new to salesforce. I have created a form where more than 10 radio groups were being used, so instead of using lightning:select several times , I made a child component of the radio group . And used it several times in my parent component form by passing label, name and value from the parent component via attributes.

So, all these radio group input fields are required , so after the form is submitted, in my parent controller I want to validate that all required fields have been filled.

I want to use reduce function for that in order to validate all required fields collectively in my parent component controller. So for that component.find('aura:id of my child component's field') is required.

How can I access child component aura ids in my parent component controller, Is the approach that I am following correct? Or there is a better way to do it.

Please help