Hi Team
I am working on form container on AEM page where I have added AEM form container within that added a container and added form options input.
I would like to achieve functionality like below. when checkbox is selected I want copy shipping address to Billing address, when unchecked the billing address should get cleared.
Please provide me some lead on how to progress on this requirement.
Thanks and Regards
Prashanthi
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
This you need to achieve using javascript or jQuery.
https://html.form.guide/html-form/html-checkbox-events/
Hi,
This you need to achieve using javascript or jQuery.
https://html.form.guide/html-form/html-checkbox-events/
Thanks @arunpatidar
I have updated the .html file of form-options-input and now I am able to map by using below script.
<script>
displayModelCheckBox = () => {
var isChecked = document.getElementById('Res-address-checkbox').checked;
if(isChecked){
document.getElementById('new-building-name-section').value = document.getElementById('building-name-section').value;
}else{
document.getElementById('new-building-name-section').value = '';
}
}
It is working fine as to go for better approach I will place this script in clientlibs.
Thanks for your response.
Views
Replies
Total Likes