Is there a recommended way to write custom js to make a field say pathbrowser inside a multifield as a requied field based on a condition? | Adobe Higher Education
Skip to main content
Manu_Mathew_
Community Advisor
Community Advisor
July 8, 2022

Is there a recommended way to write custom js to make a field say pathbrowser inside a multifield as a requied field based on a condition?

  • July 8, 2022
  • 1 답변
  • 955 조회

Is there a recommended way to write custom js to make a field say pathbrowser inside a multifield as a requied field based on a condition?

We can use- .attr("aria-required", "true"); to make the fields required , but what would recommended structure of the js be?

Also what would be the best practice to achive this?

이 주제는 답변이 닫혔습니다.

1 답변

arunpatidar
Community Advisor
Community Advisor
July 8, 2022

Hi,

You can check the implementation at https://aemlab.blogspot.com/2019/05/aem-touch-ui-component-dialog-field.html for field validation.

 

Arun Patidar
Manu_Mathew_
Community Advisor
Manu_Mathew_Community Advisor작성자
Community Advisor
July 8, 2022

@arunpatidar  Awesome article 👌. Thanks for sharing.

Manu_Mathew_
Community Advisor
Manu_Mathew_Community Advisor작성자
Community Advisor
July 8, 2022

@arunpatidar Is there a way to apply required property based on condition ?, say its optional at first and based on the checkbox on the dialog , the fields are made required and that field is inside a multifield. Similar to the min-max that applies to the whole multifield, whereas, here it is one of the field inside the multi-field.