Solved - Show/hide code

I need help trying to get this code to work correctly, I want users to be able to upload whatever they feel like uploading for a status for the social feed that I’m currently building, i have three items Photo, Link, and Text, here’s the code down below.

$w.onReady( () => {

$w("#dynamicDataset").onReady( () => {  

let item = $w(“#dynamicDataset”).getCurrentItem();

if (item.image) {

      $w("#text182").show(); 
      $w("#image43").show(); 

   }  **else**  { 

      $w("#box2").hide(); 

   }  

} );  

} );
$w.onReady( () => {

$w("#dynamicDataset").onReady( () => {  

let item = $w(“#dynamicDataset”).getCurrentItem();

if (item.box) {

      $w("#text182").show(); 
      $w("#image43").show(); 
      $w("#box2").show(); 

   }  **else**  { 

   }  

} );  

} );
$w.onReady( () => {

$w("#dynamicDataset").onReady( () => {  

let item = $w(“#dynamicDataset”).getCurrentItem();

if (item.text) {

      $w("#text182").show(); 

   }  **else**  { 
    $w("#image43").hide(); 
    $w("#box2").hide(); 
   }  

} );  

} );

What the heck.
Why you have four times:

 $w.onReady( () => {     
   $w("#dynamicDataset").onReady( () => {  
    ...
    ...
    ...
   }
  }

You only need them “ONCE”. It like you starting your car four-times again and again, but the first row worked perfectly. Never do that. :wink:

So first at all: write your code again !

And when I doesn’t work, looking first for some examples out there in the hole big Wide-Web and here, when you after 15 minute still have no progress - please feel free to ask again.

Good luck! :wink:

I’ll have to try again soon, but the whole purpose of it is to get it to show when the user wants to input a text status and hide the others picture and link (box), if the first part of the code works fine, then I’ll definitely do that, but this is the functionality I’m trying to accomplish and I’ve had this working before, but for whatever reason, doesn’t want to work now, maybe it’s because I added the image item twice???

@james-rondon-jr
Please share your code (and please as a CODE-BLOCK - it’s left to the GIF button).