Mushigee2266 Posted March 4 Report Share Posted March 4 I have a dropdown and want that when user select some particular option then two fileds should become hidden. I am using the following script but it is not working <script> document.addEventListener('DataPageReady', function() { var dpoptionElement = '[@field:Style_1Style]'; var dadop2 ='[@field:Style_1Wing]'; var dadop3 = '[@field:Style_1WingWall]'; // Check if the element exists before trying to attach an event listener if (dpoptionElement === 'Winged (BH9)' || dpoptionElement === 'Deep Diamond Button (BH7)') { dadop2.style.display = 'none'; dadop3.style.display = 'none'; } }); </script> please anyone have some solution Quote Link to comment Share on other sites More sharing options...
CoopperBackpack Posted March 5 Report Share Posted March 5 Hello @Mushigee2266, It looks like this can be achieved by using Caspio's built-in features. You can utilize Rules if this is a Form, Search page, or Details page. https://howto.caspio.com/datapages/forms/conditional-forms/ If there is a reason why Rules doesn`t work, please provide more details. Also, please specify the DataPage type where you need to implement this solution. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.